Giter Site home page Giter Site logo

Comments (5)

marler8997 avatar marler8997 commented on May 30, 2024

Thank you thank you this was bugging the heck outta me!!!!

from emacs-d-mode.

russel avatar russel commented on May 30, 2024

I wonder if there is sensible way to have an "overwrite" version of this function in d-mode. I see no way that this change would be accepted into the CC Mode code as it is nothing to do with C or C++.

from emacs-d-mode.

nordlow avatar nordlow commented on May 30, 2024

Here's the fix. You can commit it to mainline if you want to.

nordlow/emacs@57ca408

from emacs-d-mode.

nordlow avatar nordlow commented on May 30, 2024

There is one more indentation issue in d-mode, namely template restrictions on separate lines after function declaration header. For example:

auto minElement(alias F = min, R)(in R range)
    @safe pure nothrow if (isInputRange!R)
{
    return reduce!F(ElementType!R.max, range);
}

auto maxElement(alias F = min, R)(in R range)
    if (isInputRange!R)
    {
        return reduce!F(ElementType!R.max, range);
    }

The indentation behaviour is non-determinstic. In this case the indentation of maxElement depends on what is defined above it.

from emacs-d-mode.

russel avatar russel commented on May 30, 2024

It appears that there is no way of fixing this issue in the d-mode.el code since the fix is in CC Mode. I am therefore closing this issue even though the problem remains. If there is a solution short of forking CC Mode, please feel free to re-open.

from emacs-d-mode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.