fixed #66 - added prelude-restore-arrow-keys function

This commit is contained in:
Bozhidar Batsov 2012-02-16 12:41:03 +02:00
parent fb9310734c
commit 100055e879
2 changed files with 14 additions and 0 deletions

View file

@ -226,6 +226,11 @@ far as navigation is concerned at least). That's why I've disabled all
movement commands with arrows - to prevent you from being tempted to movement commands with arrows - to prevent you from being tempted to
use them. use them.
If you'd still like to use the arrow keys just invoke `M-x
prelude-restore-arrow-keys` to enable them for the duration of your
current Emacs session or add `(prelude-restore-arrow-keys)` to your
personal Emacs customization to enable them permanently.
### Windows compatibility ### Windows compatibility
While everything in Prelude should work fine in Windows I test it only While everything in Prelude should work fine in Windows I test it only

View file

@ -358,5 +358,14 @@ there's a region, all lines that region covers will be duplicated."
(unless (or (eql buffer (current-buffer)) (not (buffer-file-name buffer))) (unless (or (eql buffer (current-buffer)) (not (buffer-file-name buffer)))
(kill-buffer buffer)))) (kill-buffer buffer))))
(defun prelude-restore-arrow-keys ()
"Restores arrow keys navigation in buffers."
(interactive)
(global-set-key (kbd "<up>") 'previous-line)
(global-set-key (kbd "<down>") 'next-line)
(global-set-key (kbd "<left>") 'backward-char)
(global-set-key (kbd "<right>") 'forward-char)
(message "Arrow keys navigation in buffers in now allowed."))
(provide 'prelude-core) (provide 'prelude-core)
;;; prelude-core.el ends here ;;; prelude-core.el ends here