This looks great. Thanks! This kind of bugs exists in a bunch of places :/ The other one that I see all the time is modes that break delete-selection-mode by rebinding certain commands. Cheers, Clément. On 2016-10-10 12:41, Yuri Khan wrote: > Many movement commands, such as forward-word, forward-sexp, > forward-sentence, next-line, and their backward counterparts, support > shift selection. That is, holding down Shift along with their bindings > causes region to be activated and/or extended. > > $ emacs -Q > > C-x C-f /tmp/test.xml > > | > > C-M-S- ;; C-M- (translated) runs forward-sexp > > [] > > C-M-S- ;; C-M- (translated) runs forward-sexp > > [] > > > However, nxml-mode’s commands do not behave this way. > > | > > C-M-S-n ;; C-M-n (translated) runs nxml-forward-element > > Expected: > > [] > > Observed: > > | > > > The attached patch fixes this for me. It is based on current master (fd45b3f). >