Emacs ruby-mode indent private

Does anyone know how to make Ruby-mode in Emacs back out of all definitions under private? Here is an example:

def redirect_back_or(default)    
    redirect_to(session[:return_to] || default)    
    clear_return_to  
end 

private

    def user_from_remember_token      
        User.authenticate_with_salt(*remember_token)    
    end
+5
source share
1 answer

Private does not introduce a new scope, so defining the indentation below it is not technically correct. While there are several indentation styles for private / protected members , the only one supported by ruby-mode is semantically correct (does not introduce additional nesting). The Ruby Style Guide also recommends this style (not to mention two spaces).

, - ruby-mode.

+1

All Articles