user1017523
user1017523

Reputation:

Subword/Transient-Mark Highlighting Issues in Emacs

I have Global Subword Mode enabled, but I am trying to get Ctrl+Left/Right to travel by subwords in place of the full word default of left/right-word (the default commands for those keys).

It works as expected if I simply rebind the keys, except for one case: If I try to "transient-mark" using Ctrl+Shift+Right, rather than marking the full word like right-word does, the point is moved to the next subword without creating a region.

Is this due to Subword Mode? I would like to know if I can somehow combine some of the normal features of left/right-word like marking with the movement of Subword Mode.

Upvotes: 2

Views: 113

Answers (1)

juanleon
juanleon

Reputation: 9370

IMHO this is indeed a problem with subword-mode. You can fix it by doing:

(defadvice subword-backward (before handle-shift-selection activate)
  (handle-shift-selection))

(defadvice subword-forward (before handle-shift-selection activate)
  (handle-shift-selection))

But my advice is to do also a M-x report-emacs-bug so this can be properly fixed in next release.

Upvotes: 3

Related Questions