help-gnu-emacs
[Top][All Lists]
Advanced

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

Support for new Python 3.5 async/await keywords


From: Lele Gaifax
Subject: Support for new Python 3.5 async/await keywords
Date: Fri, 25 Sep 2015 09:40:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5.50 (gnu/linux)

Hi all,

I started using Python 3.5 in a new project, taking advantage of its new
async/await keywords. The python.el mode distributed with Emacs 24.5 of course
does not know how to handle the new syntax, and fails to properly indent the
following code:

  async def foo(bar):
  |

where the '|' represent the cursor position.

I guess there's no configuration I could tweak that would give a better
experience, but I'd like to have confirmation on this.

I also switched my local Emacs source tree to the master[*], just to see if
something happened to the forthcoming Emacs 25 python.el in this area, and it
does not seem there is any (good) news (a quick inspection of python-mode.el
sources gave the same impression).

Is there any planned path to add support for properly indent the "async"
variants of "def|with|for|whatever"?

Thanks in advance,
ciao, lele.

[*] FYI, just for fun, I also tried to build it, doing a bootstrap on a clean
    tree, but the compilation failed with an error when temacs tried to load
    "cl-preloaded.el":

    Loading /home/lele/wip/emacs/lisp/emacs-lisp/nadvice.el (source)...
    Warning: Unknown macro property gv-expander in gv-synthetic-place
    Warning: Unknown macro property gv-expander in gv-delay-error
    Loading /home/lele/wip/emacs/lisp/emacs-lisp/cl-preloaded.el (source)...
    Warning: Eager macro-expansion skipped due to cycle:
      … => (load "cl-macs.el") => (macroexpand-all (define-inline cl-typep …)) 
=> (load "cl-macs.el")
    macroexp--expand-all: (void-function define-inline)
    ...
    Compiler-macro error for cl-typep: (void-function cl--compiler-macro-typep)
    Symbol’s function definition is void: define-inline
    Makefile:706: set di istruzioni per l'obiettivo "bootstrap-emacs" non 
riuscito
    make[2]: *** [bootstrap-emacs] Errore 255
    make[2]: uscita dalla directory "/home/lele/wip/emacs/src"
    Makefile:398: set di istruzioni per l'obiettivo "src" non riuscito
    make[1]: *** [src] Errore 2
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@metapensiero.it  |                 -- Fortunato Depero, 1929.




reply via email to

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