branch: externals/ergoemacs-mode commit 11364514206d208c24122688cb8dda7080ec4e9d Author: Walter Landry <wlan...@caltech.edu> Commit: Walter Landry <wlan...@caltech.edu>
Remove all unicode-or-alt logic. Unicode all the way. --- ergoemacs-command-loop.el | 12 +++++----- ergoemacs-key-description.el | 57 +++++++++++++++++++------------------------- ergoemacs-macros.el | 2 -- ergoemacs-mode.el | 2 +- 4 files changed, 32 insertions(+), 41 deletions(-) diff --git a/ergoemacs-command-loop.el b/ergoemacs-command-loop.el index cc0c9f5..5ccae43 100644 --- a/ergoemacs-command-loop.el +++ b/ergoemacs-command-loop.el @@ -326,12 +326,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 @@ -340,13 +340,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--combine (current-key next-event) "Combine CURRENT-KEY and NEXT-EVENT into a vector." @@ -414,7 +414,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) @@ -487,7 +487,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 diff --git a/ergoemacs-key-description.el b/ergoemacs-key-description.el index 4162b25..e4086d3 100644 --- a/ergoemacs-key-description.el +++ b/ergoemacs-key-description.el @@ -154,33 +154,31 @@ MOD ar the modifiers applied to the key." ((eq key 32) (setq ret "Space")) ((eq key 127) - (setq ret (format "%sBackspace" (ergoemacs :unicode-or-alt "←" "")))) + (setq ret (format "%sBackspace" "←"))) ((eq key 'escape) (setq ret "Esc")) ((eq key 'tab) - (setq ret (format "Tab%s" - (ergoemacs :unicode-or-alt "↹" "")))) + (setq ret (format "Tab%s" "↹"))) ((eq key 'return) - (setq ret (format "Enter%s" - (ergoemacs :unicode-or-alt "↵" "")))) + (setq ret (format "Enter%s" "↵"))) ((memq key '(apps menu)) - (setq ret (ergoemacs :unicode-or-alt "▤" "Menu"))) + (setq ret "▤")) ((eq key 'left) - (setq ret (ergoemacs :unicode-or-alt "←" "left"))) + (setq ret "←")) ((eq key 'right) - (setq ret (ergoemacs :unicode-or-alt "→" "right"))) + (setq ret "→")) ((eq key 'up) - (setq ret (ergoemacs :unicode-or-alt "↑" "up"))) + (setq ret "↑")) ((eq key 'down) - (setq ret (ergoemacs :unicode-or-alt "↓" "down"))) + (setq ret "↓")) ((eq key 'prior) (setq ret "PgUp")) ((eq key 'next) (setq ret "PgDn")) ((eq key 'remap) - (setq ret (ergoemacs :unicode-or-alt "➩" "remap"))) + (setq ret "➩")) ((eq key 'ergoemacs-timeout) - (setq ret (ergoemacs :unicode-or-alt "⌚" "ergoemacs-timeout"))) + (setq ret "⌚")) ((integerp key) (setq ret (or (and (or (and (eq ergoemacs-display-capitalize-keys 'with-modifiers) mod) @@ -212,55 +210,50 @@ MOD ar the modifiers applied to the key." (eq mac-command-modifier 'meta)) (and (boundp 'ns-command-modifier) (eq ns-command-modifier 'meta)))) - (setq ret (format "%s" - (ergoemacs :unicode-or-alt "⌘" "+")))) + (setq ret (format "%s" "⌘"))) ((and (eq mod 'meta) (eq system-type 'darwin) (or (and (boundp 'mac-command-modifier) (eq mac-command-modifier 'meta)) (and (boundp 'ns-command-modifier) (eq ns-command-modifier 'meta)))) - (setq ret (format "%sCmd+" - (ergoemacs :unicode-or-alt "⌘" "+")))) + (setq ret (format "%sCmd+" "⌘"))) ((and (eq mod 'meta) (eq system-type 'darwin) (or (and (boundp 'mac-alternate-modifier) (eq mac-alternate-modifier 'meta)) (and (boundp 'ns-alternate-modifier) (eq ns-alternate-modifier 'meta)))) - (setq ret (format "%sOpt+" (ergoemacs :unicode-or-alt "⌥" "+")))) + (setq ret (format "%sOpt+" "⌥"))) ((and (eq mod 'meta) ergoemacs-display-small-symbols-for-key-modifiers (eq system-type 'darwin) (or (and (boundp 'mac-alternate-modifier) (eq mac-alternate-modifier 'meta)) (and (boundp 'ns-alternate-modifier) (eq ns-alternate-modifier 'meta)))) - (setq ret (format "%s" (ergoemacs :unicode-or-alt "⌥" "+")))) + (setq ret (format "%s" "⌥"))) ((and ergoemacs-display-small-symbols-for-key-modifiers (eq mod 'shift)) - (setq ret (ergoemacs :unicode-or-alt "⇧" "+"))) + (setq ret "⇧")) ((and ergoemacs-display-small-symbols-for-key-modifiers (eq mod 'meta)) - (setq ret (ergoemacs :unicode-or-alt "♦" "!"))) + (setq ret "♦")) ((and (or (eq system-type 'darwin) ergoemacs-display-small-symbols-for-key-modifiers) (memq mod '(control ergoemacs-control))) (setq ret "^")) ((eq mod 'shift) - (setq ret (format "%sShift+" - (ergoemacs :unicode-or-alt "⇧" "")))) + (setq ret (format "%sShift+" "⇧"))) ((memq mod '(control ergoemacs-control)) (setq ret (format "%sCtrl+" - (or (and (eq 'windows-nt system-type) - (ergoemacs :unicode "✲" "")) - (and (eq 'gnu/linux system-type) - (ergoemacs :unicode "⎈" "")) + (or (and (eq 'windows-nt system-type) "✲") + (and (eq 'gnu/linux system-type) "⎈") "")))) ((eq mod 'meta) (setq ret "Alt+")) ((and (eq mod 'super) ergoemacs-display-small-symbols-for-key-modifiers (eq system-type 'windows-nt)) - (setq ret (ergoemacs :unicode-or-alt "⊞" "#"))) + (setq ret "⊞")) ((and (eq mod 'super) (eq system-type 'windows-nt)) - (setq ret (format "%sWin+" (ergoemacs :unicode-or-alt "⊞" "#")))) + (setq ret (format "%sWin+" "⊞"))) (t (setq ret (format "%s+" mod)) (when ergoemacs-display-key-use-face-p @@ -333,13 +326,13 @@ KBD is the keyboard code. LAYOUT is the layout that is used." (setq mod tmp)) (setq tmp (format "%s%s%s%s" (or (and (or ergoemacs-display-without-brackets ergoemacs-display-key-use-face-p) "") - (and ergoemacs-display-use-unicode-brackets-around-keys (ergoemacs :unicode-or-alt "【" "[")) + (and ergoemacs-display-use-unicode-brackets-around-keys "【") "[") (mapconcat #'ergoemacs-key-description--modifier mod "") (ergoemacs-key-description--key ev mod) (or (and (or ergoemacs-display-without-brackets ergoemacs-display-key-use-face-p) "") - (and ergoemacs-display-use-unicode-brackets-around-keys (ergoemacs :unicode-or-alt "】" "]")) + (and ergoemacs-display-use-unicode-brackets-around-keys "】") "]"))) (when (and ergoemacs-display-small-symbols-for-key-modifiers ergoemacs-display-key-use-face-p) (add-text-properties 0 (length tmp) @@ -407,7 +400,7 @@ KBD is the keyboard code. LAYOUT is the layout that is used." (ergoemacs-key-description item)) ((listp item) (cond - ((eq (car item) 'lambda) (cons nil (ergoemacs :unicode-or-alt "λ" "lambda"))) + ((eq (car item) 'lambda) (cons nil "λ")) ((eq (car item) 'closure) (cons nil "#<closure>")) ((eq (car item) 'keymap) (cons nil "#<keymap>")) (t (format "%s" item)))) @@ -415,7 +408,7 @@ KBD is the keyboard code. LAYOUT is the layout that is used." (if (ignore-errors (commandp item t)) (cons 'help-function (format "%s" item)) (cons nil (format "%s" item)))) - (t (cons nil (format"#<byte compiled %s>" (ergoemacs :unicode-or-alt "λ" "lambda")))))) + (t (cons nil (format"#<byte compiled %s>" "λ"))))) (defun ergoemacs-key-description--keymap-blame (key map) "Find the source of KEY in MAP." diff --git a/ergoemacs-macros.el b/ergoemacs-macros.el index 45632db..3a25d9b 100644 --- a/ergoemacs-macros.el +++ b/ergoemacs-macros.el @@ -688,8 +688,6 @@ When arg1 can be a property. The following properties are supported: `(ergoemacs-map-properties--before-ergoemacs t)) ((and arg1 (symbolp arg1) (eq arg1 :combine) arg2 arg3) `(ergoemacs-command-loop--combine ,arg2 ,arg3)) - ((and arg1 (symbolp arg1) (memq arg1 '(:unicode-or-alt :unicode))) - `(ergoemacs-key-description--unicode-char ,@(cdr args))) ((and arg1 (symbolp arg1) (eq arg1 :modifier-desc) arg2) `(mapconcat #'ergoemacs-key-description--modifier ,arg2 "")) diff --git a/ergoemacs-mode.el b/ergoemacs-mode.el index d91cd9d..46bd58c 100644 --- a/ergoemacs-mode.el +++ b/ergoemacs-mode.el @@ -838,7 +838,7 @@ Valid values are: "Options for `ergoemacs-command-loop'." :group 'ergoemacs-mode) -(defcustom ergoemacs-command-loop-blink-character (ergoemacs :unicode-or-alt "•" "·" "-") +(defcustom ergoemacs-command-loop-blink-character "-" "Blink character." :type '(choice (string :tag "Cursor")