[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/workroom 731404dee1 32/74: Prefix "C-x x" conflicts, switc
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/workroom 731404dee1 32/74: Prefix "C-x x" conflicts, switch to "C-x c" |
Date: |
Sun, 27 Nov 2022 16:03:27 -0500 (EST) |
branch: elpa/workroom
commit 731404dee104f57962ee1b5fc470383d52a1c7b5
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>
Prefix "C-x x" conflicts, switch to "C-x c"
---
README.org | 30 +++++++++++++++---------------
workroom.el | 54 +++++++++++++++++++++++++++++++++---------------------
2 files changed, 48 insertions(+), 36 deletions(-)
diff --git a/README.org b/README.org
index c48fba2438..be92ee03b1 100644
--- a/README.org
+++ b/README.org
@@ -41,21 +41,21 @@ All the useful commands can be called with following key
sequences:
| Key | Command |
|-----------+-----------------------------|
-| ~C-x x s~ | ~workroom-switch-room~ |
-| ~C-x x S~ | ~workroom-switch-view~ |
-| ~C-x x d~ | ~workroom-kill~ |
-| ~C-x x D~ | ~workroom-kill-view~ |
-| ~C-x x r~ | ~workroom-rename~ |
-| ~C-x x R~ | ~workroom-rename-view~ |
-| ~C-x x c~ | ~workroom-clone~ |
-| ~C-x x C~ | ~workroom-clone-view~ |
-| ~C-x x m~ | ~workroom-bookmark~ |
-| ~C-x x b~ | ~workroom-switch-to-buffer~ |
-| ~C-x x a~ | ~workroom-add-buffer~ |
-| ~C-x x k~ | ~workroom-kill-buffer~ |
-| ~C-x x K~ | ~workroom-remove-buffer~ |
-
-Here the prefix key sequence is ~C-x x~, but you can customize
+| ~C-x c s~ | ~workroom-switch-room~ |
+| ~C-x c S~ | ~workroom-switch-view~ |
+| ~C-x c d~ | ~workroom-kill~ |
+| ~C-x c D~ | ~workroom-kill-view~ |
+| ~C-x c r~ | ~workroom-rename~ |
+| ~C-x c R~ | ~workroom-rename-view~ |
+| ~C-x c c~ | ~workroom-clone~ |
+| ~C-x c C~ | ~workroom-clone-view~ |
+| ~C-x c m~ | ~workroom-bookmark~ |
+| ~C-x c b~ | ~workroom-switch-to-buffer~ |
+| ~C-x c a~ | ~workroom-add-buffer~ |
+| ~C-x c k~ | ~workroom-kill-buffer~ |
+| ~C-x c K~ | ~workroom-remove-buffer~ |
+
+Here the prefix key sequence is ~C-x c~, but you can customize
~workroom-command-map-prefix~ to change it.
You might want to remap ~switch-to-buffer~, ~kill-buffer~ and other
diff --git a/workroom.el b/workroom.el
index d64e9c84aa..53994ff1db 100644
--- a/workroom.el
+++ b/workroom.el
@@ -52,22 +52,22 @@
;; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
;; Key Command
;; ────────────────────────────────────────
-;; `C-x x s' `workroom-switch-room'
-;; `C-x x S' `workroom-switch-view'
-;; `C-x x d' `workroom-kill'
-;; `C-x x D' `workroom-kill-view'
-;; `C-x x r' `workroom-rename'
-;; `C-x x R' `workroom-rename-view'
-;; `C-x x c' `workroom-clone'
-;; `C-x x C' `workroom-clone-view'
-;; `C-x x m' `workroom-bookmark'
-;; `C-x x b' `workroom-switch-to-buffer'
-;; `C-x x a' `workroom-add-buffer'
-;; `C-x x k' `workroom-kill-buffer'
-;; `C-x x K' `workroom-remove-buffer'
+;; `C-x c s' `workroom-switch-room'
+;; `C-x c S' `workroom-switch-view'
+;; `C-x c d' `workroom-kill'
+;; `C-x c D' `workroom-kill-view'
+;; `C-x c r' `workroom-rename'
+;; `C-x c R' `workroom-rename-view'
+;; `C-x c c' `workroom-clone'
+;; `C-x c C' `workroom-clone-view'
+;; `C-x c m' `workroom-bookmark'
+;; `C-x c b' `workroom-switch-to-buffer'
+;; `C-x c a' `workroom-add-buffer'
+;; `C-x c k' `workroom-kill-buffer'
+;; `C-x c K' `workroom-remove-buffer'
;; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-;; Here the prefix key sequence is `C-x x', but you can customize
+;; Here the prefix key sequence is `C-x c', but you can customize
;; `workroom-command-map-prefix' to change it.
;; You might want to remap ~switch-to-buffer~, ~kill-buffer~ and other
@@ -108,11 +108,19 @@
:prefix "workroom-"
:link '(url-link "https://codeberg.org/akib/emacs-workroom"))
-(defcustom workroom-command-map-prefix (kbd "C-x x")
+(defcustom workroom-command-map-prefix (kbd "C-x c")
"Prefix key of Workroom commands.
-Workroom-Mode must be reenabled for changes to take effect."
- :type 'key-sequence)
+Customizing this variable automatically takes effects. However, after
+changing from Lisp program doesn't immediately take effect. Call
+`workroom-rebind-command-map-prefix' for changes to take effect.
+Alternatively you can reenable Workroom-Mode which will do that for
+you."
+ :type 'key-sequence
+ :set (lambda (sym val)
+ (set-default sym val)
+ (when (fboundp 'workroom-rebind-command-map-prefix)
+ (workroom-rebind-command-map-prefix))))
(defcustom workroom-default-room-name "master"
"Name of the default workroom.
@@ -202,6 +210,13 @@ The value is a mode line terminal like `mode-line-format'."
(define-key workroom-mode-map workroom-command-map-prefix
workroom-command-map)
+(defun workroom-rebind-command-map-prefix ()
+ "Rebind command prefix key sequence `workroom-command-map-prefix'."
+ (substitute-key-definition
+ workroom-command-map nil workroom-mode-map)
+ (define-key workroom-mode-map workroom-command-map-prefix
+ workroom-command-map))
+
;;;; Workroom and View Manipulation.
@@ -1384,14 +1399,11 @@ restrict."
"Toggle workroom mode."
:lighter (:eval workroom-mode-lighter)
:global t
- (substitute-key-definition 'workroom-command-map nil
- workroom-mode-map)
- (define-key workroom-mode-map workroom-command-map-prefix
- workroom-command-map)
(if workroom-mode
(progn
(workroom-mode -1)
(setq workroom-mode t)
+ (workroom-rebind-command-map-prefix)
(let ((workroom--dont-clear-new-view t)
(default-room (workroom-get-default)))
(unless default-room
- [nongnu] elpa/workroom c38489669e 18/74: Fix the defaults of workroom-switch, (continued)
- [nongnu] elpa/workroom c38489669e 18/74: Fix the defaults of workroom-switch, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 78f0d5ee9e 38/74: Accept prefix argument in workroom-kill-with-buffers, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom a014990432 28/74: Project integration, some refactoring, update README, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 9e486d8102 30/74: Add new command workroom-kill-with-buffers, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom ba1ca498d8 58/74: Switch to most recent workroom when kill the current workroom, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom c9c22ff707 35/74: Update README, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom ff72e2be15 64/74: Remove the use of undefined function, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 80d9c60ab3 16/74: Fix the keymap issue, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 94700152e5 13/74: Lower required Emacs version and elaborate README, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 2b4f883467 43/74: Fix workroom--project-name, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 731404dee1 32/74: Prefix "C-x x" conflicts, switch to "C-x c",
ELPA Syncer <=
- [nongnu] elpa/workroom 4e746fcd34 57/74: Bump version to 2.0.4, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom f695e59165 47/74: Fix member buffer checking in workroom-kill-with-buffers, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 934101a89f 49/74: Fix adding and removing buffer from workroom, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 433f567780 29/74: Integration with IBuffer, Buffer Menu and Electric Buffer List, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom a02bb2a3a6 59/74: Bump version to 2.1, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 8bcfdc96d3 33/74: Fix workroom-kill-with-buffers, add binding for it, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 9fb5cb793e 50/74: Fix buffer add/remove in project buffer manager, ELPA Syncer, 2022/11/27