emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] 24/287: Revert ergoemacs-translate


From: Matthew Fidler
Subject: [elpa] 24/287: Revert ergoemacs-translate
Date: Wed, 02 Jul 2014 14:44:17 +0000

mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.

commit 437abbec7a7018b9423acc4248a6cccd12354f1e
Author: Matthew L. Fidler <address@hidden>
Date:   Fri May 30 19:00:18 2014 +0800

    Revert ergoemacs-translate
---
 ergoemacs-translate.el |   35 ++++++++++++++++-------------------
 1 files changed, 16 insertions(+), 19 deletions(-)

diff --git a/ergoemacs-translate.el b/ergoemacs-translate.el
index a18d5a4..1120313 100644
--- a/ergoemacs-translate.el
+++ b/ergoemacs-translate.el
@@ -855,25 +855,23 @@ and `ergoemacs-pretty-key' descriptions.
 
 (defun ergoemacs-setup-translation (layout &optional base-layout)
   "Setup translation from BASE-LAYOUT to LAYOUT."
-  (let* ((orig-base (or base-layout "us"))
-         (lay (symbol-value (intern (concat "ergoemacs-layout-" layout))))
-        shifted-list unshifted-list
-        (base (symbol-value (intern (concat "ergoemacs-layout-" orig-base))))
-        (len (length base))
-        (i 0))
+  (let ((orig-base (or base-layout "us"))
+        lay shifted-list unshifted-list base
+        len i)
+    (setq lay (symbol-value (intern (concat "ergoemacs-layout-" layout))))
+    (setq base (symbol-value (intern (concat "ergoemacs-layout-" orig-base))))
+    
+    (setq len (length base))
+    (setq i 0)
     (while (< i 60)
       (unless (or (string= "" (nth i lay))
                   (string= "" (nth (+ i 60) lay)))
-        (pushnew 'ergoemacs-shifted-assoc
-                 `(,(nth i lay) . ,(nth (+ i 60) lay))
-                 :test 'equal)
-        (pushnew 'ergoemacs-shifted-assoc
-                 `(,(nth (+ i 60) lay) . ,(nth i lay))
-                 :test 'equal)
-        (pushnew 'unshifted-list (nth i lay)
-                 :test 'equal)
-        (pushnew 'shifted-list (nth (+ i 60) lay)
-                 :test 'equal))
+        (add-to-list 'ergoemacs-shifted-assoc
+                     `(,(nth i lay) . ,(nth (+ i 60) lay)))
+        (add-to-list 'ergoemacs-shifted-assoc
+                     `(,(nth (+ i 60) lay) . ,(nth i lay)))
+        (add-to-list 'unshifted-list (nth i lay))
+        (add-to-list 'shifted-list (nth (+ i 60) lay)))
       (setq i (+ i 1)))
     (setq ergoemacs-shifted-regexp 
           (format "\\(-\\| \\|^\\)\\(%s\\)\\($\\| \\)"
@@ -899,9 +897,8 @@ and `ergoemacs-pretty-key' descriptions.
         (while (< i len)
           (unless (or (string= "" (nth i base))
                       (string= "" (nth i lay)))
-            (pushnew 'ergoemacs-translation-assoc
-                     `(,(nth i base) . ,(nth i lay))
-                     :test 'equal))
+            (add-to-list 'ergoemacs-translation-assoc
+                         `(,(nth i base) . ,(nth i lay))))
           (setq i (+ i 1)))
         (setq ergoemacs-translation-regexp
               (format "\\(-\\| \\|^\\)\\(%s\\)\\($\\| \\)"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]