From: Mark Wooding Date: Mon, 4 Jan 2010 11:32:08 +0000 (+0000) Subject: dot/emacs: More `dired' hacking: tweak keymap. X-Git-Url: https://git.distorted.org.uk/~mdw/profile/commitdiff_plain/8cb828d52151d78192e48a6f538a10f562a12deb?hp=f3f0c0a0c4b61b6d81d5186043b318fb342c8172 dot/emacs: More `dired' hacking: tweak keymap. In Emacs23, C-x C-q is already bound to a slightly different function. So don't fiddle if that key is already bound. Also, bind C-c C-s for making relative symlinks. (Could have used plain `r' but that seems weird.) --- diff --git a/dot/emacs b/dot/emacs index 1546c2c..5b37d8b 100644 --- a/dot/emacs +++ b/dot/emacs @@ -442,8 +442,11 @@ (eval-after-load "dired" '(progn - (define-key dired-mode-map [?\C-x ?\C-q] - 'wdired-change-to-wdired-mode))) + (or (lookup-key dired-mode-map [?\C-x ?\C-q]) + (define-key dired-mode-map [?\C-x ?\C-q] + 'wdired-change-to-wdired-mode)) + (and (fboundp 'dired-do-relsymlink) + (define-key dired-mode-map [?\C-c ?\C-s] 'dired-do-relsymlink)))) (add-hook 'org-mode-hook #'(lambda () (mdw-clobber-evil-keymap org-mode-map)))