branch: externals/ergoemacs-mode commit f41b18d780c2b877422782bafe2cab349344c51d Author: Walter Landry <wlan...@caltech.edu> Commit: Walter Landry <wlan...@caltech.edu>
Remove 'apps and 'menu --- ergoemacs-theme-engine.el | 25 +------------------------ ergoemacs-translate.el | 35 ----------------------------------- 2 files changed, 1 insertion(+), 59 deletions(-) diff --git a/ergoemacs-theme-engine.el b/ergoemacs-theme-engine.el index d33cae0..2b180af 100644 --- a/ergoemacs-theme-engine.el +++ b/ergoemacs-theme-engine.el @@ -660,11 +660,7 @@ See also `find-function-recenter-line' and `find-function-after-hook'." (if (string= key "f#") (setq key (aref (read-kbd-macro (concat "<" (downcase (car elt)) ">")) 0)) (setq key (string-to-char key))) - (if (eq (nth 1 elt) 'apps) - (if ergoemacs-theme--svg-prefix - (setq key (vector key)) - (setq key (vconcat (or (and (eq system-type 'windows-nt) [apps]) [menu]) (vector key)))) - (setq key (vector (event-convert-list (append (cdr elt) (list key)))))) + (setq key (vector (event-convert-list (append (cdr elt) (list key))))) (setq no-push-p nil) (when (equal key [27]) (setq no-push-p t)) @@ -714,11 +710,6 @@ See also `find-function-recenter-line' and `find-function-after-hook'." (concat (ergoemacs-key-description--modifier elt) (ergoemacs-key-description--modifier 'shift) (format " == %s shift" elt))) - ((eq elt 'apps) - (if ergoemacs-theme--svg-prefix - "Key without any modifiers" - "")) - ;; "")) ((eq elt 'title) (concat lay (or (and ergoemacs-theme--svg-prefix @@ -784,8 +775,6 @@ See also `find-function-recenter-line' and `find-function-after-hook'." (push (list (string-to-number (match-string 2)) 'meta) ergoemacs-theme--svg)) ((and (string= "C" (match-string 1))) (push (list (string-to-number (match-string 2)) 'control) ergoemacs-theme--svg)) - ((and (string= "A" (match-string 1))) - (push (list (string-to-number (match-string 2)) 'apps) ergoemacs-theme--svg)) ((string= "title" (match-string 1)) (push 'title ergoemacs-theme--svg)) ((string= "N" (match-string 1)) @@ -830,18 +819,6 @@ See also `find-function-recenter-line' and `find-function-after-hook'." (push (list (match-string 2) 'control) ergoemacs-theme--svg)) (t (push (list (string-to-number (match-string 2)) 'control) ergoemacs-theme--svg)))) - ((string= "AA" (match-string 1)) - (cond - ((string= "" (match-string 2)) - (push 'apps ergoemacs-theme--svg)) - ((string= "-SPC" (match-string 2)) - (push (list 32 'apps) ergoemacs-theme--svg)) - ((string-match-p "^F" (match-string 2)) - (push (list (match-string 2) 'apps) ergoemacs-theme--svg)) - (t - (push (list (string-to-number (match-string 2)) 'control) ergoemacs-theme--svg)) - ) - ) (t (push nil ergoemacs-theme--svg)) ) (setq pt (match-end 0)) diff --git a/ergoemacs-translate.el b/ergoemacs-translate.el index bc11f68..4c43780 100644 --- a/ergoemacs-translate.el +++ b/ergoemacs-translate.el @@ -194,30 +194,6 @@ KEY-SEQ must be a vector or string. If there is no need to change the sequence, (push event seq)))) (and found (vconcat seq))))) -(defun ergoemacs-translate--swap-apps (key &optional what with) - "In KEY, swap apps key with menu key. -Optionally specify WHAT you want to replace WITH. - -If no changes have been done, return nil." - (let ((seq (reverse (append key ()))) - (what (or what 'apps)) - (with (or with 'menu)) - found-p - ret) - (dolist (e seq) - (cond - ((eq e what) - (push with ret) - (setq found-p t)) - (t (push e ret)))) - (if found-p - (vconcat ret) - nil))) - -(defun ergoemacs-translate--swap-menu (key) - "In KEY swap menu key with apps key." - (ergoemacs-translate--swap-apps key 'menu 'apps)) - (defun ergoemacs-translate--to-vector (key) "Translates KEY to vector format. @@ -244,8 +220,6 @@ If no chanegs are performed, return nil." (defvar ergoemacs-translate--apply-funs '(ergoemacs-translate--escape-to-meta ergoemacs-translate--meta-to-escape - ergoemacs-translate--swap-apps - ergoemacs-translate--swap-menu ergoemacs-translate--to-string ergoemacs-translate--to-vector ) @@ -372,11 +346,6 @@ MODIFIERS is the precalculated modifiers from new-modifiers new-event (translation-hash (ergoemacs-translate--get-hash layout-to layout-from))) - (cond - ((and (eq system-type 'windows-nt) (eq basic 'menu)) - (setq basic 'apps)) - ((and (not (eq system-type 'windows-nt)) (eq basic 'apps)) - (setq basic 'menu))) (if (memq 'ergoemacs-control modifiers) (setq new-event basic new-modifiers modifiers) @@ -523,10 +492,6 @@ make the translation." (not just-first-p)) (setq translated-event (ergoemacs-translate--event-layout event layout-to layout-from basic modifiers))) - ((and (eq system-type 'windows-nt) (eq basic 'menu)) - (setq translated-event (ergoemacs-translate--event-convert-list (append modifiers '(apps))))) - ((and (not (eq system-type 'windows-nt)) (eq basic 'apps)) - (setq translated-event (ergoemacs-translate--event-convert-list (append modifiers '(menu))))) (t (setq translated-event event))) (setq untranslated (vconcat untranslated (list event)) ret (vconcat ret (list translated-event))))