bug#43634: 27.1; Wrong indentation in sieve-mode

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#43634: 27.1; Wrong indentation in sieve-mode

Emacs - Bugs mailing list

Copy the following Sieve script to "sample.sieve":

if size :over 100K {
  reject "I'm sorry, I do not accept mail over 100kb in size.";
}

M-x mark-whole-buffer and indent. The closing brace is reindented in a
strange way:

if size :over 100K {
  reject "I'm sorry, I do not accept mail over 100kb in size.";
         }

As sieve-mode inherits from c-mode, putting things in parens works, but
this is not valid according to the grammar (see
https://tools.ietf.org/html/rfc5228#section-3.1):

if (size :over 100K) {
  reject "I'm sorry, I do not accept mail over 100kb in size.";
}



Reply | Threaded
Open this post in threaded view
|

bug#43634: 27.1; Wrong indentation in sieve-mode

Lars Ingebrigtsen
Daniel Martín <[hidden email]> writes:

> M-x mark-whole-buffer and indent. The closing brace is reindented in a
> strange way:
>
> if size :over 100K {
>   reject "I'm sorry, I do not accept mail over 100kb in size.";
>          }
>
> As sieve-mode inherits from c-mode, putting things in parens works

I guess there isn't really much in Sieve that's that C-like.  I mean,
it's {} and strings, but ...  not the whole shebang.

Do we have a simpler mode somewhere that just understands {} and strings
that Sieve mode could inhering from instead?

--
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no