[Info-vax] Editors, was: Re: VT keyboard replacement

Lawrence D’Oliveiro lawrencedo99 at gmail.com
Wed Nov 10 17:15:58 EST 2021


On Thursday, November 11, 2021 at 7:37:59 AM UTC+13, Simon Clubley wrote:
> That's the kind of thing that ends up in a language mode in Emacs. 

Which I prefer to avoid.

> I've just had a quick look around and found this:
>
> https://www.emacswiki.org/emacs/PythonProgrammingInEmacs
>
> No idea if it's any good for you.

Just a note that I write my Python code perhaps a little differently from how most people do it. I put in “#end” comments to mark the end of compound statements, e.g.

    @classmethod
    def create(celf, **kwargs) :
        "creates a new FontOptions object. See FontOptions.props for valid arg keywords."
        leftover = set(kwargs.keys()) - set(FontOptions.props)
        if len(leftover) != 0 :
            raise TypeError("unexpected arguments %s" % ", ".join(leftover))
        #end if
        result = celf()
        for k in celf.props :
            if k in kwargs :
                setattr(result, k, kwargs[k])
            #end if
        #end for
        return \
            result
    #end create

That way, jumping between lines with the same indent conveniently takes you to the start or end of a compound statement.


More information about the Info-vax mailing list