aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoam Postavsky2019-05-05 09:13:19 -0400
committerNoam Postavsky2019-05-12 08:05:01 -0400
commitb1cc876b6c9d00cd9d9f4ed65176274bf35a81c4 (patch)
treecd941eba4e4d791e18ce3a15d55718991b049f95
parent571d802df38cb1d3f93222f2977b766995616ac7 (diff)
downloademacs-b1cc876b6c9d00cd9d9f4ed65176274bf35a81c4.tar.gz
emacs-b1cc876b6c9d00cd9d9f4ed65176274bf35a81c4.zip
Use remapping in ffap-bindings (Bug#35577)
* lisp/ffap.el (ffap-bindings): Bind to the [remap COMMAND] instead of hardcoding the default keybindings. This better adapts better if non-default are used. And lets the original keybindings be remembered, so that, e.g., \[find-file] in docstrings will still be substituted with C-x C-f (even though that binding has been remapped to find-file-at-point.
-rw-r--r--lisp/ffap.el26
1 files changed, 13 insertions, 13 deletions
diff --git a/lisp/ffap.el b/lisp/ffap.el
index 36e37e95fe8..bcb5efef544 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -2042,19 +2042,19 @@ This hook is intended to be put in `file-name-at-point-functions'."
2042 '((global-set-key [S-mouse-3] 'ffap-at-mouse) 2042 '((global-set-key [S-mouse-3] 'ffap-at-mouse)
2043 (global-set-key [C-S-mouse-3] 'ffap-menu) 2043 (global-set-key [C-S-mouse-3] 'ffap-menu)
2044 2044
2045 (global-set-key "\C-x\C-f" 'find-file-at-point) 2045 (global-set-key [remap find-file] 'find-file-at-point)
2046 (global-set-key "\C-x\C-r" 'ffap-read-only) 2046 (global-set-key [remap find-file-read-only] 'ffap-read-only)
2047 (global-set-key "\C-x\C-v" 'ffap-alternate-file) 2047 (global-set-key [remap find-alternate-file] 'ffap-alternate-file)
2048 2048
2049 (global-set-key "\C-x4f" 'ffap-other-window) 2049 (global-set-key [remap find-file-other-window] 'ffap-other-window)
2050 (global-set-key "\C-x5f" 'ffap-other-frame) 2050 (global-set-key [remap find-file-other-frame] 'ffap-other-frame)
2051 (global-set-key "\C-x4r" 'ffap-read-only-other-window) 2051 (global-set-key [remap find-file-read-only-other-window] 'ffap-read-only-other-window)
2052 (global-set-key "\C-x5r" 'ffap-read-only-other-frame) 2052 (global-set-key [remap find-file-read-only-other-frame] 'ffap-read-only-other-frame)
2053 2053
2054 (global-set-key "\C-xd" 'dired-at-point) 2054 (global-set-key [remap dired] 'dired-at-point)
2055 (global-set-key "\C-x4d" 'ffap-dired-other-window) 2055 (global-set-key [remap dired-other-window] 'ffap-dired-other-window)
2056 (global-set-key "\C-x5d" 'ffap-dired-other-frame) 2056 (global-set-key [remap dired-other-frame] 'ffap-dired-other-frame)
2057 (global-set-key "\C-x\C-d" 'ffap-list-directory) 2057 (global-set-key [remap list-directory] 'ffap-list-directory)
2058 2058
2059 (add-hook 'gnus-summary-mode-hook 'ffap-gnus-hook) 2059 (add-hook 'gnus-summary-mode-hook 'ffap-gnus-hook)
2060 (add-hook 'gnus-article-mode-hook 'ffap-gnus-hook) 2060 (add-hook 'gnus-article-mode-hook 'ffap-gnus-hook)