emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] scratch/widen-less a4ba846: Replace prog-widen with co


From: Wedler, Christoph
Subject: Re: [Emacs-diffs] scratch/widen-less a4ba846: Replace prog-widen with consolidating widen calls
Date: Mon, 18 Dec 2017 17:41:51 +0000
User-agent: Microsoft-MacOutlook/f.29.0.171205

Dmitry Gutov wrote:
> On 12/18/17 2:39 PM, Wedler, Christoph wrote:

> It shouldn't matter much either way, but in Emacs 26 syntax-ppss already 
> checks that point-min has not changed since the last invocation.

OK, then I'll keep the dynamic binding to make it work in Emacs-25, too.

> Did you use the same recipe when testing the widen-less branch, though? 
> I'm pretty sure you can't simply run ./configure when building from 
> development sources (not a pre-built tarball).

Actually, I build that branch only

    Head:     widen-less Consolidate 'widen' calls
    Merge:    origin/widen-less Consolidate 'widen' calls
    Tag:      emacs-26.0.90 (351)

The build sequence was

    ./autogen.sh
    ./configure --with-ns --without-makeinfo --with-gnutls=no
    make

> I'm saying I don't know what to check. Indentation certainly doesn't 
> work the same, e.g. because the examples use a non-default indentation 
> offset. But I'm not sure that's all.

OK, ANTLR source have TAB length 4, the file is not even completly
consistently indented with that, but the lines of interest are 46 to 51
of Python/C/C.g of the antlr3 examples repo, as mentioned earlier,
namely:

@members {
    def isTypeName(self, name):
        for scope in reversed(self.Symbols_stack):
            if name in scope.types:
                return True

        return False

}

It looks strange to me that you neither get syntax highlighting
(keywords "def", "self", "for", …, function name "isTypeName", ...)
nor the indentation cycling for the lines starting with "for", "if",
"return"

>>> Now to a mode with non-widening indentation function: emacs-lisp mode:
>>> Consider the following code
>>>       (defun foo ()
>>>         (+ 1 3))
>>>
>>> I would assume that the indentation of line 2 does not change
>>> when I narrow to line 2 - but Emacs-25.1.1 now deletes the first 2
>>> spaces of line 2...  (yes; I also need to update to a newer Emacs)
> 
>> Try out the widen-less branch!
> 
> Ehem, still the same...

> Are you sure you tried the right branch? It works differently over here 
> (namely: doesn't change the indentation).

Yes, see above - and no "init.el" except using antlr-mode 3.1.5.  Very
strange...

>> P.S. I will probably "borrow" (aka "steal") from mhtml-mode.el later...

Sorry Stefan, I forgot the ";-" after "steal"...




reply via email to

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