emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master b1cc876 1/2: Use remapping in ffap-bindings (Bug#35


From: Noam Postavsky
Subject: [Emacs-diffs] master b1cc876 1/2: Use remapping in ffap-bindings (Bug#35577)
Date: Sun, 12 May 2019 08:06:17 -0400 (EDT)

branch: master
commit b1cc876b6c9d00cd9d9f4ed65176274bf35a81c4
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    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.
---
 lisp/ffap.el | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/lisp/ffap.el b/lisp/ffap.el
index 36e37e9..bcb5efe 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'."
    '((global-set-key [S-mouse-3] 'ffap-at-mouse)
      (global-set-key [C-S-mouse-3] 'ffap-menu)
 
-     (global-set-key "\C-x\C-f" 'find-file-at-point)
-     (global-set-key "\C-x\C-r" 'ffap-read-only)
-     (global-set-key "\C-x\C-v" 'ffap-alternate-file)
-
-     (global-set-key "\C-x4f"   'ffap-other-window)
-     (global-set-key "\C-x5f"   'ffap-other-frame)
-     (global-set-key "\C-x4r"   'ffap-read-only-other-window)
-     (global-set-key "\C-x5r"   'ffap-read-only-other-frame)
-
-     (global-set-key "\C-xd"    'dired-at-point)
-     (global-set-key "\C-x4d"   'ffap-dired-other-window)
-     (global-set-key "\C-x5d"   'ffap-dired-other-frame)
-     (global-set-key "\C-x\C-d" 'ffap-list-directory)
+     (global-set-key [remap find-file] 'find-file-at-point)
+     (global-set-key [remap find-file-read-only] 'ffap-read-only)
+     (global-set-key [remap find-alternate-file] 'ffap-alternate-file)
+
+     (global-set-key [remap find-file-other-window] 'ffap-other-window)
+     (global-set-key [remap find-file-other-frame] 'ffap-other-frame)
+     (global-set-key [remap find-file-read-only-other-window] 
'ffap-read-only-other-window)
+     (global-set-key [remap find-file-read-only-other-frame] 
'ffap-read-only-other-frame)
+
+     (global-set-key [remap dired] 'dired-at-point)
+     (global-set-key [remap dired-other-window] 'ffap-dired-other-window)
+     (global-set-key [remap dired-other-frame] 'ffap-dired-other-frame)
+     (global-set-key [remap list-directory] 'ffap-list-directory)
 
      (add-hook 'gnus-summary-mode-hook 'ffap-gnus-hook)
      (add-hook 'gnus-article-mode-hook 'ffap-gnus-hook)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]