[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ergoemacs-mode d9b09be 246/325: Make command loop play
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ergoemacs-mode d9b09be 246/325: Make command loop play with unicode only |
Date: |
Sat, 23 Oct 2021 18:49:03 -0400 (EDT) |
branch: externals/ergoemacs-mode
commit d9b09beb8eeb3593045b98677a186a03aaad17a5
Author: Matthew Fidler <514778+mattfidler@users.noreply.github.com>
Commit: Matthew Fidler <514778+mattfidler@users.noreply.github.com>
Make command loop play with unicode only
---
ergoemacs-advice.el | 6 ++++++
ergoemacs-command-loop.el | 24 ++++++++++++------------
ergoemacs-themes.el | 6 +++++-
3 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/ergoemacs-advice.el b/ergoemacs-advice.el
index 7af3d24..7e37bef 100644
--- a/ergoemacs-advice.el
+++ b/ergoemacs-advice.el
@@ -170,6 +170,12 @@ TYPE is the type of translation installed."
(when (eq 'ergoemacs-command-loop--shift-translate (key-binding
(this-single-command-keys)))
(setq this-command-keys-shift-translated t)))
+(ergoemacs-advice read-key (&optional prompt)
+ "Drop single command keys for read-key." ; For compataiblity with emacs 25.5
+ :type :before
+ (setq ergoemacs-command-loop--single-command-keys nil))
+
+
(provide 'ergoemacs-advice)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ergoemacs-advice.el ends here
diff --git a/ergoemacs-command-loop.el b/ergoemacs-command-loop.el
index af73e3e..ab81351 100644
--- a/ergoemacs-command-loop.el
+++ b/ergoemacs-command-loop.el
@@ -201,7 +201,7 @@ ignore the post-command hooks.")
(sexp :tag "Translated Type")))
:group 'ergoemacs-command-loop)
-(defcustom ergoemacs-command-loop-blink-character (ergoemacs :unicode-or-alt
"•" "·" "-")
+(defcustom ergoemacs-command-loop-blink-character "•"
"Blink character."
:type '(choice
(string :tag "Cursor")
@@ -555,12 +555,12 @@ UNIVERSAL"
(and (not universal) "")
(or (and (string= ergoemacs-command-loop--read-key-prompt
"") "") " ")
(and ergoemacs-command-loop-blink-character
- (or (and blink-on (ergoemacs :unicode-or-alt
ergoemacs-command-loop-blink-character "-"))
+ (or (and blink-on
ergoemacs-command-loop-blink-character)
" "))
" ")
(or
(and (not universal) "")
- (ergoemacs :unicode-or-alt "▸" ">"))))
+ "▸")))
(format
"%s%s%s %s "
(cond
@@ -569,13 +569,13 @@ UNIVERSAL"
(t current-prefix-arg))
(or (and (not universal) "")
(and ergoemacs-command-loop-blink-character
- (or (and blink-on (ergoemacs :unicode-or-alt
ergoemacs-command-loop-blink-character "-"))
+ (or (and blink-on ergoemacs-command-loop-blink-character)
" "))
" ")
(or (and (listp current-prefix-arg)
(format "%s" current-prefix-arg))
"")
- (ergoemacs :unicode-or-alt "▸" ">"))))
+ "▸")))
(defun ergoemacs-command-loop--ensure-sane-variables ()
"Make sure that certain variables won't lock up Emacs.
@@ -655,7 +655,7 @@ This is not done when the event is [ergoemacs-ignore]"
((not (stringp prompt)))
((not (string= ""
ergoemacs-command-loop--read-key-prompt)) prompt)
((or (string= prompt " ")
- (string-match-p prompt (concat " *" (ergoemacs
:unicode-or-alt ergoemacs-command-loop-blink-character "-") " *")))
+ (string-match-p prompt (concat " *"
ergoemacs-command-loop-blink-character " *")))
nil)
(ergoemacs-command-loop--universal prompt)
(ergoemacs-command-loop--echo-keystrokes-complete prompt)
@@ -848,7 +848,7 @@ KEYS is the keys information"
(or (and (string= ergoemacs-command-loop--read-key-prompt "") "") " ")
(or (and universal "")
(and ergoemacs-command-loop-blink-character
- (or (and blink-on (ergoemacs :unicode-or-alt
ergoemacs-command-loop-blink-character "-"))
+ (or (and blink-on ergoemacs-command-loop-blink-character)
" "))
" ")
trans
@@ -993,7 +993,7 @@ read."
;; (string-match-p
"\\<mouse\\>" tmp))
(format "%s%s%s"
(ergoemacs :modifier-desc
(nth 0 elt))
- (ergoemacs
:unicode-or-alt "↔" "<->")
+ "↔"
(ergoemacs :modifier-desc
(nth 1 elt))))
double ", "))
"")
@@ -1002,7 +1002,7 @@ read."
(lambda(elt)
(format "%s%s%s"
(ergoemacs :modifier-desc (nth 0
elt))
- (ergoemacs :unicode-or-alt "→"
"->")
+ "→"
(ergoemacs :modifier-desc (nth 1
elt))))
trans ", "))) ""))
(maphash
@@ -1013,8 +1013,8 @@ read."
(setq tmp (format "%s%s%s"
(ergoemacs-key-description local-key)
(if (eq (nth 1 item) :force)
- (ergoemacs :unicode-or-alt "⇒" "=>")
- (ergoemacs :unicode-or-alt "→" "->"))
+ "⇒"
+ "→")
(ergoemacs :modifier-desc (nth 0 item))))
(push (elt local-key 0) mod-keys)
(setq keys (or (and (not keys) tmp)
@@ -2139,7 +2139,7 @@ TRANSLATED-KEY is what the assumed key is actually bound."
(eq ergoemacs-echo-function :multi-key)))
(ergoemacs-command-loop--temp-message "%s%s%s%s"
(ergoemacs-key-description key)
- (ergoemacs :unicode-or-alt "→" "->")
+ "→"
lookup
(or (and translated-key
(format " (from %s)"
(ergoemacs-key-description translated-key)))
diff --git a/ergoemacs-themes.el b/ergoemacs-themes.el
index 1431ad3..3ee0f02 100644
--- a/ergoemacs-themes.el
+++ b/ergoemacs-themes.el
@@ -1329,6 +1329,10 @@ keys (e.g. M-O A == <up>) or regular M-O keybinding."
(ergoemacs-define-key ergoemacs-override-keymap (kbd "<menu> n t")
'org-capture)
(ergoemacs-define-key ergoemacs-override-keymap (kbd "<menu> n C-t")
'org-agenda)
(ergoemacs-define-key ergoemacs-override-keymap (kbd "<menu> n T")
'org-agenda)
+ ;(define-key ergoemacs-translate--parent-map [f2]
'ergoemacs-command-loop--force-universal-argument)
+ ;(define-key ergoemacs-translate--parent-map (kbd "DEL")
'ergoemacs-command-loop--force-undo-last))
+ ;(define-key ergoemacs-translate--parent-map (if (eq system-type
'windows-nt) [apps] [menu])
+ ; 'ergoemacs-command-loop--swap-translation)
)
(defun ergoemacs-install-standard-theme ()
@@ -1423,7 +1427,7 @@ keys (e.g. M-O A == <up>) or regular M-O keybinding."
(ergoemacs-translation ctl-to-alt ()
"Ctl <-> Alt translation"
- :text (lambda() (format "<Ctl%sAlt> " (ergoemacs :unicode-or-alt "↔" " to
")))
+ :text "<Ctl↔Alt> "
:meta '(control)
:control '(meta)
- [elpa] externals/ergoemacs-mode 581be06 212/325: Remove lots of timing code, (continued)
- [elpa] externals/ergoemacs-mode 581be06 212/325: Remove lots of timing code, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 1cf6041 225/325: Remove :current-version, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode fe1d378 226/325: Remove :current-theme, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 78bd8cf 231/325: Remove component stuff, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode d10087f 238/325: Remove ergoemacs macro :reset and :set-selection, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 2caaef6 239/325: Remove unused functions, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 4461083 242/325: Add reduction theme again, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 97a2107 243/325: Add back the command loop. Part of it seems broken, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 33cc2d6 244/325: Fix command loop key decriptions, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode ef2c71a 245/325: Add back the advices to have the ctrl/alt keys, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode d9b09be 246/325: Make command loop play with unicode only,
Stefan Monnier <=
- [elpa] externals/ergoemacs-mode efc8751 249/325: Some fixes based on emacs elpa requirements, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 69abf8d 250/325: Fix ergoemacs-calculate-bindings, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode bed9aa1 253/325: Fix ergoemacs-mode and ergoemacs-themes; turn on cua mode, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 57e8e17 257/325: remove undo-tree and mark-active, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode edc154f 272/325: Add theme for the ergoemacs keys hash. Also reduce tests, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 09bc371 278/325: Restore menu items after turning off ergoemacs, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode f14b71e 281/325: Remove ergoemacs-mode support for term-mode, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode f3ebfc1 298/325: Add input-pending-p to echoing of commands, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 349d05a 300/325: Remove describe theme, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 00e00a6 230/325: Remove ergoemacs-component-struct, Stefan Monnier, 2021/10/23