[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 210/287: Test Issue #243. C-c C-c M-x vs C-c C-c.
From: |
Matthew Fidler |
Subject: |
[elpa] 210/287: Test Issue #243. C-c C-c M-x vs C-c C-c. |
Date: |
Wed, 02 Jul 2014 14:46:04 +0000 |
mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.
commit bbc50dcea014d807f08e2b0aaa526b2d9ad3df92
Author: Matthew L. Fidler <address@hidden>
Date: Tue Jun 24 22:52:42 2014 +0800
Test Issue #243. C-c C-c M-x vs C-c C-c.
---
ergoemacs-test.el | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/ergoemacs-test.el b/ergoemacs-test.el
index 9227c9e..19322c9 100644
--- a/ergoemacs-test.el
+++ b/ergoemacs-test.el
@@ -937,6 +937,37 @@ Selected mark would not be cleared after paste."
"Test global C-c b"
(should (equal (ergoemacs-test-global-key-set-before nil "C-c b") t)))
+(ert-deftest ergoemacs-test-issue-243 ()
+ "Allow globally set keys like C-c C-c M-x to work globally while local
commands like C-c C-c will work correctly. "
+ :expected-result :failed
+ (let ((emacs-exe (ergoemacs-emacs-exe))
+ (w-file (expand-file-name "global-test" ergoemacs-dir))
+ (temp-file (make-temp-file "ergoemacs-test" nil ".el")))
+ (with-temp-file temp-file
+ (insert "(condition-case err (progn ")
+ (insert (format "(add-to-list 'load-path \"%s\")" ergoemacs-dir))
+ (insert "(setq ergoemacs-theme nil)")
+ (insert "(setq ergoemacs-keyboard-layout \"us\")")
+ (insert "(require 'ergoemacs-mode)(require
'ergoemacs-test)(ergoemacs-mode 1)")
+ (insert "(global-set-key (kbd \"C-c C-c M-x\")
'execute-extended-command)")
+ (insert (format "(define-key ergoemacs-test-major-mode-map (kbd \"C-c
C-c\") #'(lambda() (interactive (with-temp-file \"%s\" (insert \"Ok\")))))"
w-file))
+ (insert
+ "(setq ergoemacs-test-macro (edmacro-parse-keys \"C-c C-c\"
t))(ergoemacs-test-major-mode)")
+ (insert "(with-timeout (1.5 nil) (execute-kbd-macro
ergoemacs-test-macro))")
+ (insert (format "(if (file-exists-p \"%s\") (message \"Passed\")
(message \"Failed\"))" w-file))
+ (insert ") (error (message \"Error %s\" err)))")
+ (unless (boundp 'wait-for-me)
+ (insert "(kill-emacs)")))
+ (message "%s"
+ (shell-command-to-string
+ (format "%s %s -Q -l %s"
+ (if (boundp 'wait-for-me) "" "--batch")
+ emacs-exe temp-file)))
+ (delete-file temp-file)
+ (should (file-exists-p w-file))
+ (when (file-exists-p w-file)
+ (delete-file w-file))))
+
(provide 'ergoemacs-test)
- [elpa] 189/287: Do all tests, (continued)
- [elpa] 189/287: Do all tests, Matthew Fidler, 2014/07/02
- [elpa] 188/287: Fix some byte-compile issues, Matthew Fidler, 2014/07/02
- [elpa] 190/287: Fix Issue #233, Matthew Fidler, 2014/07/02
- [elpa] 193/287: Fix Issue #241, Matthew Fidler, 2014/07/02
- [elpa] 205/287: Only push new keys to ergoemacs-global-override-rm-keys, and don't push [remap]s (Issue #243), Matthew Fidler, 2014/07/02
- [elpa] 191/287: change downcase and UPCASE for being more clear., Matthew Fidler, 2014/07/02
- [elpa] 208/287: Fix helm-M-x keys again., Matthew Fidler, 2014/07/02
- [elpa] 206/287: Remove debugging comment for ergoemacs-rm-key, Matthew Fidler, 2014/07/02
- [elpa] 207/287: Fix ergoemacs-pushnew Issue #244., Matthew Fidler, 2014/07/02
- [elpa] 209/287: Declare ergoemacs-use-M-x-p, Matthew Fidler, 2014/07/02
- [elpa] 210/287: Test Issue #243. C-c C-c M-x vs C-c C-c.,
Matthew Fidler <=
- [elpa] 211/287: Add send outlook files to emacs, Matthew Fidler, 2014/07/02
- [elpa] 213/287: Merge branch 'master' of github.com:ergoemacs/ergoemacs-mode, Matthew Fidler, 2014/07/02
- [elpa] 215/287: Merge pull request #245 from bmalehorn/programmer-dv, Matthew Fidler, 2014/07/02
- [elpa] 214/287: fix incorrect ergoemacs-layout-programmer-dv, Matthew Fidler, 2014/07/02
- [elpa] 212/287: modified ergoemacs-cut-all so it doesn't join previous cut., Matthew Fidler, 2014/07/02
- [elpa] 216/287: Drop FIXME, Matthew Fidler, 2014/07/02
- [elpa] 223/287: Remove archive-mode and ses-mode from menus. Issue #246., Matthew Fidler, 2014/07/02
- [elpa] 217/287: Fix image generation and autohotkey generation, Matthew Fidler, 2014/07/02
- [elpa] 220/287: Partial Fix for Issue #243, Matthew Fidler, 2014/07/02
- [elpa] 222/287: Merge branch 'master' of github.com:ergoemacs/ergoemacs-mode, Matthew Fidler, 2014/07/02