[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/guru-mode 4eefd48 02/42: initial commit
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/guru-mode 4eefd48 02/42: initial commit |
Date: |
Wed, 11 Aug 2021 09:58:26 -0400 (EDT) |
branch: elpa/guru-mode
commit 4eefd4892234584e6c4777dfae37d584ae220ffe
Author: Bozhidar Batsov <bozhidar@batsov.com>
Commit: Bozhidar Batsov <bozhidar@batsov.com>
initial commit
---
gosu-mode.el | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 78 insertions(+)
diff --git a/gosu-mode.el b/gosu-mode.el
new file mode 100644
index 0000000..c9dd732
--- /dev/null
+++ b/gosu-mode.el
@@ -0,0 +1,78 @@
+;;; gosu-mode.el --- Become an Emacs gosu
+
+;; Copyright (C) 2012 Bozhidar Batsov
+
+;; Author: Bozhidar Batsov
+;; URL: https://github.com/bbatsov/gosu-mode
+;; Version: 0.1
+;; Keywords: convenience
+
+;; This file is NOT part of GNU Emacs.
+
+;;; License:
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+;;
+;; Gosu mode teaches to use Emacs properly.
+;;
+;;; Code:
+
+(defvar gosu-mode-map (make-sparse-keymap)
+ "Gosu mode's keymap.")
+
+(defvar affected-bindings-list '(("<left>" . "C-b")
+ ("<right>" . "C-f")
+ ("<up>" . "C-p")
+ ("<down>" . "C-n")
+ ("<C-left>" . "M-b")
+ ("<C-right>" . "M-f")
+ ("<C-up>" . "M-{")
+ ("<C-down>" . "M-}")
+ ("<M-left>" . "M-b")
+ ("<M-right>" . "M-f")
+ ("<M-up>" . "M-{")
+ ("<M-down>" . "M-}")
+ ("<delete>" . "C-d")
+ ("<C-delete>" . "M-d")
+ ("<M-delete>" . "M-d")
+ ("<next>" . "C-v")
+ ("<C-next>" . "M-x <")
+ ("<prior>" . "M-v")
+ ("<C-prior>" . "M-x >")
+ ("<home>" . "C-a")
+ ("<C-home>" . "M->")
+ ("<C-home>" . "M-<")
+ ("<end>" . "C-e")
+ ("<C-end>" . "M->")))
+
+(defun gosu-rebind (original-key alt-key)
+ `(lambda ()
+ (interactive)
+ (message (concat ,original-key " keybinding is disabled! Use " ,alt-key "
instead."))))
+
+(dolist (cell affected-bindings-list)
+ (define-key gosu-mode-map
+ (read-kbd-macro (first cell)) (gosu-rebind (first cell) (rest cell))))
+
+(define-minor-mode gosu-mode
+ "A minor mode that teaches to help you use Emacs the way it was intended to
be used."
+ t " gosu"
+ 'gosu-mode-map :global t)
+
+(provide 'gosu-mode)
+;;; gosu-mode.el ends here
- [nongnu] branch elpa/guru-mode created (now fcb13d4), ELPA Syncer, 2021/08/11
- [nongnu] elpa/guru-mode 5f8576a 01/42: Initial commit, ELPA Syncer, 2021/08/11
- [nongnu] elpa/guru-mode 4eefd48 02/42: initial commit,
ELPA Syncer <=
- [nongnu] elpa/guru-mode 4decfe5 06/42: get rid of the useless concat, ELPA Syncer, 2021/08/11
- [nongnu] elpa/guru-mode 5e117f2 05/42: renamed to guru-mode, ELPA Syncer, 2021/08/11
- [nongnu] elpa/guru-mode be0e3aa 11/42: Merge pull request #3 from dneelyep/master, ELPA Syncer, 2021/08/11
- [nongnu] elpa/guru-mode 62058a8 07/42: added missing autoload, ELPA Syncer, 2021/08/11
- [nongnu] elpa/guru-mode a4f88ba 03/42: renamed to guru-mode, ELPA Syncer, 2021/08/11
- [nongnu] elpa/guru-mode 12d55ac 04/42: Update master, ELPA Syncer, 2021/08/11
- [nongnu] elpa/guru-mode 3221bcd 08/42: provided a non-global version of guru-mode, ELPA Syncer, 2021/08/11
- [nongnu] elpa/guru-mode 62a9a00 16/42: Bump version to 0.2, ELPA Syncer, 2021/08/11
- [nongnu] elpa/guru-mode fc9dc59 17/42: Clean up a bit, ELPA Syncer, 2021/08/11
- [nongnu] elpa/guru-mode b33e4d1 18/42: Update hook example, ELPA Syncer, 2021/08/11