~a-roehler/python-mode/XEmacs-compat-test

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
Python Mode News
================
New in version 6.0.5
--------------------

- support local environments like `virtualenv'

  M-x `py-install-local-shells' called in a
  dired-buffer installs named shells from locally found
  executables.
  See customizable `py-extensions'.  Or install like this:
  (py-install-local-shells "MY-PATH/EXECUTABLE")

  Alternatively edit/install `py-shell-template', giving
  `py-shell-name' the full path incl. executable

  If calls to common `py-shell' should use local executable
  instead of default system Python set
  `py-use-local-default' alongside with
  `py-shell-local-path'
  see command `py-toggle-local-default-use'

- `py-shell-name' accepts PATH/TO/EXECUTABLE
  in addition to name of an installed default Python-Shell.
  Permits installing commands like
  (defun python-XYZ-shell (&optional argprompt)
    "Start an Python-XYZ interpreter ... "
    (interactive)
    (let ((py-shell-name "PATH/TO/PYTHON-XYZ"))
      (py-shell argprompt)))

- new command `py-execute-region-default' forces the
  systems default Python interpreter to execute, ignores
  shebang

  related functions redesigned, `async' argument dropped
  `py-execute-region' now reads:

  (defun py-execute-region (start end &optional shell dedicated)
    "Send the region to a Python interpreter.

  When called with \\[univeral-argument], execution through `default-value' of `py-shell-name' is forced.
  When called with \\[univeral-argument] followed by a number different from 4 and 1, user is prompted to specify a shell. This might be the name of a system-wide shell or include the path to a virtual environment.

  When called from a programm, it accepts a string specifying a shell which will be forced upon execute as argument. "
  [ ... ]

- new `py-number-face',
  visible only when customized and `py-use-number-face-p' is `t',
  inherits default face
  With large files fontifying numbers may cause a delay
  Credits to github.com/fgallina/python.el/issues42

- new boolean `py-report-level-p'
  if `t', reached indent level is messaged

New in version 6.0.4
--------------------

- Python shell starts with `python-mode'
  that's needed by completion for now
  boolean customizable `py-start-run-py-shell'

- outline-(minor-)mode enabled providing regular
  expressions. Customize `py-outline-minor-mode-p' to
  switch it on with python-mode

- Hook delivered to start hs-minor-mode from python-mode
  Customize `py-hide-show-minor-mode-p'
  Key setting example:
  (global-set-key [(super s)] 'hs-hide-all)
  (global-set-key [(super S)] 'hs-show-all)

- Listing of available commands in org-mode and reST
  format in directory "doc"

- Python shells and executing forms may be called as
  dedicated process. See commands available \w suffix
  "-dedicated".

- completion fixed: M-TAB completes in Python buffer, TAB
  completes in Python shells

- py-down-FORM-lc commands
  Goto beginning of line following end of FORM.
  \"-lc\" stands for \"left-corner\" - a complementary command travelling left, whilst `py-end-of-FORM' stops at right corner.
  Implemented forms are "block", "clause", "def", "class", "statement".

- py-down-FORM commands

  like py-down-block introduced in version 6.0.3,
  implemented also for "clause", "def", "class",
  "statement".
  Go to the beginning of next block below
  current level.

New in version 6.0.3
--------------------

- ipython integration started

- commands `ipython', `python2', `python3', `jython', `python'
  opening a respective python shell

-  py-shift-block-left, py-shift-block-right etc.
  Implemented forms that way are
  "paragraph" "block" "clause" "def" "class" "line" "statement"

- py-dedent
  Dedent line according to `py-indent-offset'. With
  arg, do it that many times. If point is between
  indent levels, dedent to next level. Stops at BOL.
  Returns column reached, if dedent done, nil otherwise.

- py-indent-forward-line
  Indent line and move one line forward. If
  `py-kill-empty-line' is non-nil, delete an empty
  line. When closing a form, use py-close-block et al,
  which will move and indent likewise. Returns position.

- py-close-block, -clause, -def, class
  Set indent level to that of beginning of definition.
  If final line isn't empty and
  `py-close-block-provides-newline' non-nil, insert a
  newline. Returns column.

- new commands specifying the shell override
  `py-shell-name' for execution
  implemented shells are "python" "python2" "python2.7"
  "python3" "python3.2" "jython"

  available with default, -switch and -no-switch
  option, i.e.
  py-execute-region-python3.2
  py-execute-region-python3.2-switch
  py-execute-region-python3.2-no-switch etc.

  Docstring of py-execute-region-python3.2-switch for
  example: "Send the region to a common shell calling the
  python3.2 interpreter. Ignores setting of
  `py-shell-switch-buffers-on-execute', output-buffer
  will being switched to."

- Declarations
  Deal with assigments resp. statements in current
  level which don't open blocks. Provides common edit
  functions as copy, mark, kill, goto beg/end.

  Functions will be used typically to grasp
  initialisations resp. assignements of variables
  between the definition of a class or method and it's
  body, likewise global stuff at the head of a file.

- column-marker.el
  Commands `column-marker-1', `column-marker-2', and
  `column-marker-3' each highlight a given column
  (using different background colors by default).

  M-x column-marker-1 highlights the column where the
  cursor is, in face `column-marker-1'.

  C-u 70 M-x column-marker-2 highlights column 70 in
  face `column-marker-2'.

  C-u 70 M-x column-marker-3 highlights column 70 in
  face `column-marker-3'. The face `column-marker-2'
  highlighting no longer shows.

  C-u M-x column-marker-3 turns off highlighting for
  column-marker-3, so face `column-marker-2'
  highlighting shows again for column 70.

  C-u C-u M-x column-marker-1 (or -2 or -3) erases all
  column highlighting.

  ;;

  Thanks a lot to it's author Rick Bielawski <rbielaws@i1.net>,
  to Drew Adams for his care and Emacs Wiki hosting it.

New in version 6.0.2
--------------------

- py-electric-comment

  "Insert a comment. If starting a comment, indent
   accordingly. If a numeric argument ARG is provided,
   that many colons are inserted non-electrically. With
   universal-prefix-key C-u a \"#\" Electric behavior
   is inhibited inside a string or comment."

- New commands `py-partial-expression':

  "." operators delimit a partial-expression on it's
  level.

  Given the function below, `py-partial-expression'
  called at pipe symbol would copy and return:

  def usage():
      print """Usage: %s
      ....""" % (
          os.path.basename(sys.argv[0]))
  ------------|-------------------------
  ==> path

          os.path.basename(sys.argv[0]))
  ------------------|-------------------
  ==> basename(sys.argv[0]))

          os.path.basename(sys.argv[0]))
  --------------------------|-----------
  ==> sys

          os.path.basename(sys.argv[0]))
  ------------------------------|-------
  ==> argv[0]

  while `py-expression' would copy and return

  (
          os.path.basename(sys.argv[0]))

  ;;;;;

  Also for existing commands a shorthand is defined:

  (defalias 'py-statement 'py-copy-statement)

  which will mark, copy and return.

- Commands implementing a behavior which customizing of
 `py-shell-switch-buffers-on-execute' would do:

  py-execute-buffer-no-switch
  py-execute-buffer-switch
  py-execute-region-no-switch
  py-execute-region-switch

- Several bugfixes.

New in version 6.0.1
--------------------

- New commands py-expression:

  py-copy-expression
  py-mark-expression
  py-beginning-of-expression
  py-end-of-expression
  py-kill-expression

  Also several of bugfixes are done.

New in version 6.0
--------------------

- Finer grained commands, core re-write.

  As shown below for the `mark'-command, delete,
  copy, jump to beginning and end of the respective
  programming-expressions:

  py-mark-statement
  py-mark-block
  py-mark-block-or-clause
  py-mark-def
  py-mark-def-or-class
  py-mark-class
  py-mark-clause

- Also a couple of bugfixes are done.

New in version 5.2.1
--------------------

- Syntax highlight as a keyword "lambda:" just like "lambda x:".  Given by Dan
  Davison.
- Add "python3" as a key for python-mode in interpreter-mode-alist and
  auto-mode-alist.

New in version 5.2.0
--------------------

- Fixed filling of triple-quoted strings.

- Add new font-lock faces for class names and exception names.

- Do not fill when calling fill-paragraph with point in a region of code.

- Fixed font-locking of exception names in parenthesized lists.

- Fixed font-locking of decorators with arguments.

- Fixed font-locking of triple-quoted strings; single quotes appearing in
  triple-quoted strings no longer upset font-locking.

- Fixed the stack-entry regexp used by pdbtrack so that it now works with
  module-level frames.

- Do not bind C-c C-h; `py-help-at-point' is now on C-c C-e by default.

- hide-show mode is now supported.

- When shifting regions right and left, keep the region active in Emacs.