New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect highlighting of 'let' with show-paren-mode #26
Comments
There is a philosophical question lurking here: is "in" the closing When you're on the "in" the "let" is highlighted because of Similarly, C-M-b from right after the "in" will make you jump back to C-M-f and C-M-b normally jump over "a complete subexpression", so
|
Thanks for the explanation Stefan. I agree that jumping from "in" back But even if forward jumping from "let" to "in" is not supported, I would For reference, "fun", "if", "match", and "try" are in the same Also, since ocaml uses distinct "else" and "if" instead of a combined Cheers, Josh |
There's no doubt that jumping from "let" to "in" would be useful. But C-M-f can't do that because it already does something else (i.e. jump to the end of the let expression). So we need a new function that jumps to the next sub-element of the current AST node. And sorry for overlooking the fact that "let" gets highlighted as unmatched; that's indeed an error. Could you report it via "M-x report-emacs-bug" since it's a bug in smie.el rather than in Tuareg? As for highlighting the "inners" (such as "else", "in", ...) I suggest you file another M-x report-emacs-bug requesting this feature. This will require implementing the new function mentioned before to jump from "let" to "in". |
Done, see http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19079.
Done, see http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19080. |
With emacs 24.4 and tuareg 2.0.8, enabling show-paren-mode results in somewhat strange highlighting. For a buffer containing only the code:
putting the point at
in
correctly highlights the matchinglet
, but putting the point at thatlet
highlights it as unmatched. For reference, the behavior offorward-sexp
andbackward-sexp
is consistent, moving fromin
tolet
, but not back. The highlighting of parens, brackets, etc. as well asbegin
andend
seems to work as expected.The text was updated successfully, but these errors were encountered: