I am using js-mode in emacs 25.1. There are some indentation rules that are not editable through the provided customization variables. The specific one I have issue with is the indentation of arrow functions, they are not indented like regular anonymous functions. After looking at the function js--proper-indentation, the only way to edit it is to redefine the function. Should I redefine it in my js-mode-hook?
You will probably want to use
defadvice to provide a wrapper around
js--proper-indentation, rather than cometely redefining it. This will allow you to handle the indentation for arrow functions yourself, while calling through to the original function to handle everything else.