unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Lele Gaifax <lele@metapensiero.it>
To: help-gnu-emacs@gnu.org
Subject: Support for new Python 3.5 async/await keywords
Date: Fri, 25 Sep 2015 09:40:46 +0200	[thread overview]
Message-ID: <87fv23q741.fsf@nautilus.nautilus> (raw)

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	other threads:[~2015-09-25  7:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-25  7:40 Lele Gaifax [this message]
2015-09-25 12:05 ` Support for new Python 3.5 async/await keywords tomas
2015-09-25 15:12   ` Lele Gaifax

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fv23q741.fsf@nautilus.nautilus \
    --to=lele@metapensiero.it \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).