enh-ruby-mode rebinds C-M-f to enh-ruby-forward-sexp. That key is bound to forward-sexp by default. Similarly C-M-n is rebound to enh-ruby-end-of-block in stead of forward-list etc..
This means that the behaviour is inconsistent with the built-in functions. That works fine for those particular commands that have had their keys re-bound. However enh-ruby-mode does not rebind e.g. C-M-SPC which is bound to mark-sexp. This means that the sexp that you can mark is not the same as the one you can navigate.
To fix this problem we could do one of two things
The first solution might be the quick fix. It may have the downside of duplicating some functionality that Emacs already ships with. The second solution might require some more work. It could be that it's simply a matter of locally redefining forward-sexp as I can see that e.g. mark-sexp calls this internally. More investigation is required. The second solution might also fix other problems I haven't identified yet.
Thoughts?
enh-ruby-moderebindsC-M-ftoenh-ruby-forward-sexp. That key is bound toforward-sexpby default. SimilarlyC-M-nis rebound toenh-ruby-end-of-blockin stead offorward-listetc..This means that the behaviour is inconsistent with the built-in functions. That works fine for those particular commands that have had their keys re-bound. However
enh-ruby-modedoes not rebind e.g.C-M-SPCwhich is bound tomark-sexp. This means that the sexp that you can mark is not the same as the one you can navigate.To fix this problem we could do one of two things
C-M-SPC,C-M-t...The first solution might be the quick fix. It may have the downside of duplicating some functionality that Emacs already ships with. The second solution might require some more work. It could be that it's simply a matter of locally redefining
forward-sexpas I can see that e.g.mark-sexpcalls this internally. More investigation is required. The second solution might also fix other problems I haven't identified yet.Thoughts?