Attached are two patches inspired by bug #9830. The request there was to make master-buffer-view and master-buffer-update fall back to buffer-view and buffer-update, since it's annoying to have to use different shortcuts with different documents, if one is used to working with master documents. In fact, all that is really needed is to change the shortcuts to use command-alternatives. I've done this myself for a long time, and it seems a simple enough change. That is the first patch.

The second patch addresses a related but different issue. In cua.bind, C-S-T is bound to "buffer-update ps" and C-S-D to "buffer-update dvi". It seems to me that it would be good to have one of these bound to "buffer-update pdf" instead, and I'd make it C-S-T, as that is consistent with what we have in mac.bind.

Comments?

Richard

>From 218ea8d2f5e92af1b068952b1eb69f90775371ea Mon Sep 17 00:00:00 2001
From: Richard Heck <rgh...@lyx.org>
Date: Wed, 4 Nov 2015 11:26:36 -0500
Subject: [PATCH 1/2] Make shortcuts for master-buffer-X fall back to buffer-X.

---
 lib/bind/cua.bind | 10 +++++-----
 lib/bind/mac.bind |  8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lib/bind/cua.bind b/lib/bind/cua.bind
index b7903b6..2aa9be5 100644
--- a/lib/bind/cua.bind
+++ b/lib/bind/cua.bind
@@ -45,14 +45,14 @@ Format 2
 \bind "C-r"			"buffer-view"
 \bind "C-d"			"buffer-view dvi"	# 'd' for dvi
 \bind "C-t"			"buffer-view ps"
-\bind "C-M-r"			"master-buffer-view"
-\bind "C-M-t"			"master-buffer-view ps"
-\bind "C-M-d"			"master-buffer-view dvi"
+\bind "C-M-r"			"command-alternatives master-buffer-view; buffer-view"
+\bind "C-M-t"			"command-alternatives master-buffer-view ps; buffer-view ps"
+\bind "C-M-d"			"command-alternatives master-buffer-view dvi; buffer-view dvi"
 \bind "C-S-R"			"buffer-update"
 \bind "C-S-D"			"buffer-update dvi"	# 'd' for dvi
 \bind "C-S-T"			"buffer-update ps"
-\bind "C-M-S-t"			"master-buffer-update ps"
-\bind "C-M-S-d"			"master-buffer-update dvi"
+\bind "C-M-S-t"			"command-alternatives master-buffer-update ps; buffer-update ps"
+\bind "C-M-S-d"			"command-alternatives master-buffer-update dvi; buffer-update dvi"
 \bind "C-q"			"lyx-quit"
 \bind "C-Next"			"buffer-next"
 \bind "C-Tab"			"buffer-next"
diff --git a/lib/bind/mac.bind b/lib/bind/mac.bind
index 5190332..18d0862 100644
--- a/lib/bind/mac.bind
+++ b/lib/bind/mac.bind
@@ -136,7 +136,7 @@ Format 2
 #  +: "Option-Command-D"             # Show or hide the Dock
 #  -: "Command-Control D"            # Display the definition of the selected word in the Dictionary application
 \bind "C-d"                          "buffer-view dvi"	# 'd' for dvi
-\bind "C-M-d"                        "master-buffer-view dvi"
+\bind "C-M-d"                        "command-alternatives master-buffer-view dvi; buffer.view dvi"
 \bind "C-S-D"                        "buffer-update dvi"	# 'd' for dvi
 #  -: "Command-E"                    # Use the selection for a find
 \bind "C-e"                          "font-emph"
@@ -176,7 +176,7 @@ Format 2
 \bind "C-S-S"                        "buffer-write-as"
 #  -: "Command-T"                    # Display the Fonts window
 \bind "C-t"                          "buffer-view pdf"
-\bind "C-M-t"                        "master-buffer-view pdf"
+\bind "C-M-t"                        "command-alternatives master-buffer-view pdf; buffer-view pdf"
 #  -: "Option-Command-T"             # Show or hide a toolbar
 #  -: "Command-U"                    # Underline the selected text or turn underlining on or off
 \bind "C-u"                          "font-underline"
@@ -253,8 +253,8 @@ Format 2
 \bind "C-S-O"                        "font-strikeout"
 \bind "C-S-T"                        "buffer-update pdf" # (pdflatex; was "ps")
 \bind "C-S-R"                        "buffer-update"
-\bind "C-M-S-T"                      "master-buffer-update pdf"
-\bind "C-M-S-D"                      "master-buffer-update dvi"
+\bind "C-M-S-T"                      "command-alternatives master-buffer-update pdf; buffer-update pdf"
+\bind "C-M-S-D"                      "command-alternatives master-buffer-update dvi; buffer-update dvi"
 
 \bind "C-S-E"                        "changes-track" # it's what MS Word uses
 \bind "~S-M-quotedbl"                "quote-insert single"
-- 
2.4.3

>From 9914eca0fa6ca3b6e03b364c512c0635be89edf1 Mon Sep 17 00:00:00 2001
From: Richard Heck <rgh...@lyx.org>
Date: Wed, 4 Nov 2015 11:27:28 -0500
Subject: [PATCH 2/2] Change Postscript shortcuts to PDF shortcuts.

---
 lib/bind/cua.bind | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/bind/cua.bind b/lib/bind/cua.bind
index 2aa9be5..b8c920c 100644
--- a/lib/bind/cua.bind
+++ b/lib/bind/cua.bind
@@ -44,14 +44,14 @@ Format 2
 \bind "C-S-S"			"buffer-write-as"
 \bind "C-r"			"buffer-view"
 \bind "C-d"			"buffer-view dvi"	# 'd' for dvi
-\bind "C-t"			"buffer-view ps"
+\bind "C-t"			"buffer-view pdf"
 \bind "C-M-r"			"command-alternatives master-buffer-view; buffer-view"
-\bind "C-M-t"			"command-alternatives master-buffer-view ps; buffer-view ps"
+\bind "C-M-t"			"command-alternatives master-buffer-view pdf; buffer-view pdf"
 \bind "C-M-d"			"command-alternatives master-buffer-view dvi; buffer-view dvi"
 \bind "C-S-R"			"buffer-update"
 \bind "C-S-D"			"buffer-update dvi"	# 'd' for dvi
-\bind "C-S-T"			"buffer-update ps"
-\bind "C-M-S-t"			"command-alternatives master-buffer-update ps; buffer-update ps"
+\bind "C-S-T"			"buffer-update pdf"
+\bind "C-M-S-t"			"command-alternatives master-buffer-update pdf; buffer-update pdf"
 \bind "C-M-S-d"			"command-alternatives master-buffer-update dvi; buffer-update dvi"
 \bind "C-q"			"lyx-quit"
 \bind "C-Next"			"buffer-next"
-- 
2.4.3

Reply via email to