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: Dmitry Gutov
Subject: Re: [Emacs-diffs] scratch/widen-less a4ba846: Replace prog-widen with consolidating widen calls
Date: Tue, 19 Dec 2017 02:27:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Thunderbird/58.0

On 12/18/17 7:41 PM, Wedler, Christoph wrote:

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

But that branch checks for (boundp 'prog-indentation-context). Which got taken out of Emacs 25, didn't it?

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)

Not sure which tool's output this is.

The build sequence was

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

Could you try with 'make bootstrap' instead of just 'make'?

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 seems to work okay. Thanks.

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"

I don't get syntax highlighting there, but indentation works fine. I just needed to know which part of the example file to test.

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...

If 'make bootstrap' doesn't help, could you try a step-by-step instruction, or a video, or something?



reply via email to

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