[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 07/15: Allow short symbols to represent keys
From: |
Matthew Fidler |
Subject: |
[elpa] 07/15: Allow short symbols to represent keys |
Date: |
Sun, 06 Jul 2014 03:56:17 +0000 |
mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.
commit 240c7cf95a2a6c651f110e8efc239dda66eff51c
Author: Matthew L. Fidler <address@hidden>
Date: Thu Jul 3 11:56:06 2014 -0500
Allow short symbols to represent keys
---
ergoemacs-translate.el | 30 ++++++++++++++++++++++++++----
1 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/ergoemacs-translate.el b/ergoemacs-translate.el
index 4aca702..781914f 100644
--- a/ergoemacs-translate.el
+++ b/ergoemacs-translate.el
@@ -115,6 +115,12 @@ This assumes `ergoemacs-use-unicode-char' is non-nil. When
:type 'boolean
:group 'ergoemacs-mode)
+;; FIXME: invalidate/fix cache when changing.
+(defcustom ergoemacs-use-small-symbols nil
+ "Use small symbols to represent alt+ ctl+ etc. on windows/linux."
+ :type 'boolean
+ :group 'ergoemacs-mode)
+
(defvar ergoemacs-use-M-x-p nil)
(defvar ergoemacs-M-x)
@@ -208,10 +214,11 @@ This assumes `ergoemacs-use-unicode-char' is non-nil.
When
(goto-char (point-min))
(while (re-search-forward "[+]\\([[:lower:]]\\)\\(】\\|\\]\\)" nil
t)
(replace-match (upcase (match-string 0)) t t))
- (when (and (eq system-type 'darwin)
- (string= "⇧" (ergoemacs-unicode-char "⇧" ""))
- (string= "⌘" (ergoemacs-unicode-char "⌘" ""))
- (string= "⌥" (ergoemacs-unicode-char "⌥" "")))
+ (cond
+ ((and (eq system-type 'darwin)
+ (string= "⇧" (ergoemacs-unicode-char "⇧" ""))
+ (string= "⌘" (ergoemacs-unicode-char "⌘" ""))
+ (string= "⌥" (ergoemacs-unicode-char "⌥" "")))
(goto-char (point-min))
(while (re-search-forward ".Opt[+]" nil t)
(replace-match "⌥"))
@@ -224,6 +231,21 @@ This assumes `ergoemacs-use-unicode-char' is non-nil. When
(goto-char (point-min))
(while (re-search-forward "Ctl[+]" nil t)
(replace-match "^")))
+ ((and ergoemacs-use-small-symbols
+ (string= "⇧" (ergoemacs-unicode-char "⇧" ""))
+ (string= "♦" (ergoemacs-unicode-char "♦" "")))
+ (goto-char (point-min))
+ (while (re-search-forward ".Alt[+]" nil t)
+ (replace-match "♦"))
+ (goto-char (point-min))
+ (while (re-search-forward ".Shift[+]" nil t)
+ (replace-match "⇧"))
+ (goto-char (point-min))
+ (while (re-search-forward "Ctl[+]" nil t)
+ (replace-match "^"))))
+ (goto-char (point-min))
+ (unless (looking-at (regexp-quote ob))
+ (insert ob))
(setq ret (buffer-string)))))
ret))))
- [elpa] branch externals/ergoemacs-mode updated (376bdc5 -> e2ab286), Matthew Fidler, 2014/07/05
- [elpa] 01/15: Should fix Issue #251, Matthew Fidler, 2014/07/05
- [elpa] 05/15: Put back C-u -> Ctrl+U instead of Ctrl+u, Matthew Fidler, 2014/07/05
- [elpa] 03/15: Make U-> ã€â‡§Shift+U】, Matthew Fidler, 2014/07/05
- [elpa] 02/15: Check for pkg-dir to load ergoemacs-macros on compile, Matthew Fidler, 2014/07/05
- [elpa] 06/15: Fix website addresses, Matthew Fidler, 2014/07/05
- [elpa] 07/15: Allow short symbols to represent keys,
Matthew Fidler <=
- [elpa] 04/15: Fix package-list-packages to show: X packages can be upgraded; type `ã€â‡§Shift+U】' to mark them for upgrading., Matthew Fidler, 2014/07/05
- [elpa] 08/15: Add test for U in package list, Matthew Fidler, 2014/07/05
- [elpa] 09/15: Add unbound commands test for C-x C-s, Matthew Fidler, 2014/07/05
- [elpa] 10/15: Fix Issue #264, Matthew Fidler, 2014/07/05
- [elpa] 11/15: declare real-key-binding, Matthew Fidler, 2014/07/05
- [elpa] 12/15: Make package a requirement., Matthew Fidler, 2014/07/05
- [elpa] 14/15: Remove unnecessary file expansion, Matthew Fidler, 2014/07/05
- [elpa] 13/15: remove ergoemacs-unbind-keymap compiler warning, Matthew Fidler, 2014/07/05
- [elpa] 15/15: Merge branch 'externals/ergoemacs-mode' of git+ssh://git.sv.gnu.org/srv/git/emacs/elpa, Matthew Fidler, 2014/07/05