all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: 20790@debbugs.gnu.org
Subject: bug#20790: Add more S-SPC key bindings
Date: Fri, 12 Jun 2015 02:36:21 +0300	[thread overview]
Message-ID: <87fv5x24y2.fsf@mail.linkov.net> (raw)

After adding S-SPC to some modes in bug#2145
it's natural to expect S-SPC to be the reverse of SPC
to move in opposite direction, but in modes where SPC
moves point by one line, S-SPC unexpectedly moves back
a full screen (because it uses the default binding
scroll-down-command in special-mode).  This patch
binds S-SPC to line-oriented commands.

diff --git a/lisp/dired.el b/lisp/dired.el
index 02946e0..babdf35 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1541,7 +1541,8 @@ (defvar dired-mode-map
     (define-key map "<" 'dired-prev-dirline)
     (define-key map ">" 'dired-next-dirline)
     (define-key map "^" 'dired-up-directory)
-    (define-key map " "  'dired-next-line)
+    (define-key map " " 'dired-next-line)
+    (define-key map [?\S-\ ] 'dired-previous-line)
     (define-key map [remap next-line] 'dired-next-line)
     (define-key map [remap previous-line] 'dired-previous-line)
     ;; hiding
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index eb03a8b..87f1e05 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -271,6 +271,7 @@ (defvar vc-dir-mode-map
     (define-key map " " 'vc-dir-next-line)
     (define-key map "\t" 'vc-dir-next-directory)
     (define-key map "p" 'vc-dir-previous-line)
+    (define-key map [?\S-\ ] 'vc-dir-previous-line)
     (define-key map [backtab] 'vc-dir-previous-directory)
     ;;; Rebind paragraph-movement commands.
     (define-key map "\M-}" 'vc-dir-next-directory)
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index 4df41b5..44d9a21 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -395,6 +395,7 @@ (defvar archive-mode-map
     (define-key map "o" 'archive-extract-other-window)
     (define-key map "p" 'archive-previous-line)
     (define-key map "\C-p" 'archive-previous-line)
+    (define-key map [?\S-\ ] 'archive-previous-line)
     (define-key map [up] 'archive-previous-line)
     (define-key map "r" 'archive-rename-entry)
     (define-key map "u" 'archive-unflag)
diff --git a/lisp/proced.el b/lisp/proced.el
index 69355ab..65bd243 100644
--- a/lisp/proced.el
+++ b/lisp/proced.el
@@ -463,6 +463,7 @@ (defvar proced-mode-map
     (define-key km "\C-n" 'next-line)
     (define-key km "\C-p" 'previous-line)
     (define-key km "\C-?" 'previous-line)
+    (define-key km [?\S-\ ] 'previous-line)
     (define-key km [down] 'next-line)
     (define-key km [up] 'previous-line)
     ;; marking





             reply	other threads:[~2015-06-11 23:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-11 23:36 Juri Linkov [this message]
2015-11-12 20:54 ` bug#20790: Add more S-SPC key bindings Juri Linkov
2015-11-12 23:51 ` Random832
2015-11-13  0:53   ` Emanuel Berg
2015-11-13  2:52     ` Random832
2015-11-13  3:11       ` Emanuel Berg
2015-11-13  2:19   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fv5x24y2.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=20790@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.