Changing Emacs Forward-Word Behaviour

Try: (require ‘misc) Then use M-x forward-to-word and see if it does what you want. You can then rebind M-f, etc. To make the _ not a word separator (i.e. make it a word constituent) for C & C++ mode, you would do this: (modify-syntax-entry ?_ “w” c-mode-syntax-table) (modify-syntax-entry ?_ “w” c++-mode-syntax-table) For more information … Read more

Binding M- / M- in Emacs 23.1.1

Emacs has a complex mechanism to handle the vicissitudes of function key and modifier encodings on various terminal types. It doesn’t work out of the box in all cases. The following settings should work on your terminal: (define-key input-decode-map “\e\eOA” [(meta up)]) (define-key input-decode-map “\e\eOB” [(meta down)]) (global-set-key [(meta up)] ‘transpose-line-up) (global-set-key [(meta down)] ‘transpose-line-down) … Read more