I custom my forward-word as vim-like 'w' follow this, this works fine except that M-S-f no longer selects text.
So, I write the function:
(defun forward-to-word-with-selection (arg)
(interactive "p")
(if (not (eq last-command 'forward-to-word-with-selection))
(progn (message "Mark Set")
(set-mark-command))
(forward-to-word arg)))
(global-set-key (kbd "M-F") 'forward-to-word-with-selection)
But, I got a messy error:
Then I run this function step-by-step(with C-c C-e, any other better debug approach is well come, since I'm newbie to elisp), this error due to the (set-mark-command).