aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2017-12-09 10:13:02 +0100
committerMichael Albinus2017-12-09 10:13:02 +0100
commit836168a65b63fa32f60bbf211e4238bde49e1f01 (patch)
tree20e7f8763132d64c3ceb55408706e3fdb2c15188
parent7367ea4fc78fd11683eb0b57b0337c575a6accc2 (diff)
parent1fdac2d65c7134a2e1261bf7ad32d275f37da0dc (diff)
downloademacs-836168a65b63fa32f60bbf211e4238bde49e1f01.tar.gz
emacs-836168a65b63fa32f60bbf211e4238bde49e1f01.zip
Merge from origin/emacs-26
1fdac2d65c Don't add newlines in minibuffer history de68f337e3 modhelp.py: Support Python 3 (Bug#24954) afb04f7f3c Use forward slashes for python w32 config example (Bug#21656)
-rw-r--r--lisp/progmodes/python.el4
-rw-r--r--lisp/simple.el2
-rwxr-xr-xmodules/modhelp.py24
3 files changed, 16 insertions, 14 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 9e09bfc5941..9d3e428e23c 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -91,9 +91,9 @@
91;; is as follows (of course you need to modify the paths according to 91;; is as follows (of course you need to modify the paths according to
92;; your system): 92;; your system):
93 93
94;; (setq python-shell-interpreter "C:\\Python27\\python.exe" 94;; (setq python-shell-interpreter "C:/Python27/python.exe"
95;; python-shell-interpreter-args 95;; python-shell-interpreter-args
96;; "-i C:\\Python27\\Scripts\\ipython-script.py") 96;; "-i C:/Python27/Scripts/ipython-script.py")
97 97
98;; Missing or delayed output used to happen due to differences between 98;; Missing or delayed output used to happen due to differences between
99;; Operating Systems' pipe buffering (e.g. CPython 3.3.4 in Windows 7. 99;; Operating Systems' pipe buffering (e.g. CPython 3.3.4 in Windows 7.
diff --git a/lisp/simple.el b/lisp/simple.el
index 24ecf6929d9..03855d5f2b0 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2114,6 +2114,8 @@ next element of the minibuffer history in the minibuffer."
2114 (interactive "^p") 2114 (interactive "^p")
2115 (or arg (setq arg 1)) 2115 (or arg (setq arg 1))
2116 (let* ((old-point (point)) 2116 (let* ((old-point (point))
2117 ;; Don't add newlines if they have the mode enabled globally.
2118 (next-line-add-newlines nil)
2117 ;; Remember the original goal column of possibly multi-line input 2119 ;; Remember the original goal column of possibly multi-line input
2118 ;; excluding the length of the prompt on the first line. 2120 ;; excluding the length of the prompt on the first line.
2119 (prompt-end (minibuffer-prompt-end)) 2121 (prompt-end (minibuffer-prompt-end))
diff --git a/modules/modhelp.py b/modules/modhelp.py
index 78fadda4126..9f8d3066062 100755
--- a/modules/modhelp.py
+++ b/modules/modhelp.py
@@ -45,31 +45,31 @@ def cmd_test(args):
45 45
46 failed = [] 46 failed = []
47 for m in mods: 47 for m in mods:
48 print '[*] %s: ------- start -------' % m 48 print('[*] %s: ------- start -------' % m)
49 print '[*] %s: running make' % m 49 print('[*] %s: running make' % m)
50 r = sp.call(make_cmd, cwd=m) 50 r = sp.call(make_cmd, cwd=m)
51 if r != 0: 51 if r != 0:
52 print '[E] %s: make failed' % m 52 print('[E] %s: make failed' % m)
53 failed += [m] 53 failed += [m]
54 continue 54 continue
55 55
56 print '[*] %s: running test' % m 56 print('[*] %s: running test' % m)
57 testpath = os.path.join(m, 'test.el') 57 testpath = os.path.join(m, 'test.el')
58 if os.path.isfile(testpath): 58 if os.path.isfile(testpath):
59 emacs_cmd = [EMACS, '-batch', '-L', '.', '-l', 'ert', 59 emacs_cmd = [EMACS, '-batch', '-L', '.', '-l', 'ert',
60 '-l', testpath, '-f', 'ert-run-tests-batch-and-exit'] 60 '-l', testpath, '-f', 'ert-run-tests-batch-and-exit']
61 print ' '.join(emacs_cmd) 61 print(' '.join(emacs_cmd))
62 r = sp.call(emacs_cmd) 62 r = sp.call(emacs_cmd)
63 if r != 0: 63 if r != 0:
64 print '[E] %s: test failed' % m 64 print('[E] %s: test failed' % m)
65 failed += [m] 65 failed += [m]
66 continue 66 continue
67 else: 67 else:
68 print '[W] %s: no test to run' % m 68 print('[W] %s: no test to run' % m)
69 69
70 print '\n[*] %d/%d MODULES OK' % (len(mods)-len(failed), len(mods)) 70 print('\n[*] %d/%d MODULES OK' % (len(mods)-len(failed), len(mods)))
71 for m in failed: 71 for m in failed:
72 print '\tfailed: %s' % m 72 print('\tfailed: %s' % m)
73 73
74def to_lisp_sym(sym): 74def to_lisp_sym(sym):
75 sym = re.sub('[_ ]', '-', sym) 75 sym = re.sub('[_ ]', '-', sym)
@@ -81,7 +81,7 @@ def to_c_sym(sym):
81 81
82def cmd_init(args): 82def cmd_init(args):
83 if os.path.exists(args.module): 83 if os.path.exists(args.module):
84 print "%s: file/dir '%s' already exists" % (__file__, args.module) 84 print("%s: file/dir '%s' already exists" % (__file__, args.module))
85 return 85 return
86 86
87 os.mkdir(args.module) 87 os.mkdir(args.module)
@@ -98,10 +98,10 @@ def cmd_init(args):
98 if isinstance(path, string.Template): 98 if isinstance(path, string.Template):
99 path = path.substitute(template_vars) 99 path = path.substitute(template_vars)
100 path = os.path.join(args.module, path) 100 path = os.path.join(args.module, path)
101 print "writing %s..." % path 101 print("writing %s..." % path)
102 with open(path, "w+") as f: 102 with open(path, "w+") as f:
103 f.write(t.substitute(template_vars)) 103 f.write(t.substitute(template_vars))
104 print "done! you can run %s test %s" % (__file__, args.module) 104 print("done! you can run %s test %s" % (__file__, args.module))
105 105
106 106
107def main(): 107def main():