diff --git a/collects/drracket/private/main.rkt b/collects/drracket/private/main.rkt index 6270a460a4..ec0dacb7a2 100644 --- a/collects/drracket/private/main.rkt +++ b/collects/drracket/private/main.rkt @@ -116,7 +116,7 @@ ll)))) (drr:set-default 'drracket:module-language-first-line-special? #t boolean?) - +(drr:set-default 'drracket:use-old-style-keybindings #f boolean?) (drr:set-default 'drracket:defns-popup-sort-by-name? #f boolean?) (drr:set-default 'drracket:show-line-numbers? #f boolean?) @@ -329,6 +329,10 @@ (make-check-box 'drracket:module-language-first-line-special? (string-constant ml-always-show-#lang-line) + editor-panel) + + (make-check-box 'drracket:use-old-style-keybindings + (string-constant old-style-keybindings) editor-panel))) (preferences:add-to-editor-checkbox-panel diff --git a/collects/drracket/private/unit.rkt b/collects/drracket/private/unit.rkt index 8c83dbc0f5..6b3bdee01a 100644 --- a/collects/drracket/private/unit.rkt +++ b/collects/drracket/private/unit.rkt @@ -3338,7 +3338,7 @@ module browser threading seems wrong. (set! file-menu:create-new-tab-item (new menu:can-restore-menu-item% (label (string-constant new-tab)) - (shortcut #\t) + (shortcut (if (preferences:get 'drracket:use-old-style-keybindings) #\= #\t)) (parent file-menu) (callback (λ (x y) @@ -3417,8 +3417,13 @@ module browser threading seems wrong. (preferences:get 'framework:print-output-mode))))) (super file-menu:between-print-and-close file-menu)) + (inherit edit-menu:get-replace-item) (define/override (edit-menu:between-find-and-preferences edit-menu) (super edit-menu:between-find-and-preferences edit-menu) + (when (preferences:get 'drracket:use-old-style-keybindings) + (define item (edit-menu:get-replace-item)) + (send item set-shortcut #\r) + (send item set-shortcut-prefix (get-default-shortcut-prefix))) (new menu:can-restore-menu-item% [label (string-constant complete-word)] [shortcut #\/] @@ -3621,7 +3626,7 @@ module browser threading seems wrong. (string-constant execute-menu-item-label) language-specific-menu (λ (_1 _2) (execute-callback)) - #\r + (if (preferences:get 'drracket:use-old-style-keybindings) #\t #\r) (string-constant execute-menu-item-help-string))) (make-object menu:can-restore-menu-item% (string-constant ask-quit-menu-item-label) diff --git a/collects/string-constants/private/english-string-constants.rkt b/collects/string-constants/private/english-string-constants.rkt index 6441bc4086..d4de794ca1 100644 --- a/collects/string-constants/private/english-string-constants.rkt +++ b/collects/string-constants/private/english-string-constants.rkt @@ -478,6 +478,7 @@ please adhere to these guidelines: (show-interactions-on-execute "Automatically open interactions window when running a program") (switch-to-module-language-automatically "Automatically switch to the module language when opening a module") (interactions-beside-definitions "Put the interactions window beside the definitions window") ;; in preferences, below the checkbox one line above this one + (old-style-keybindings "Old-style keybindings (Run: -t; New-tab: -=; Replace: -r)") (show-line-numbers "Show line numbers") (show-line-numbers/menu "Show Line &Numbers") ;; just like the above, but capitalized for appearance in a menu item (hide-line-numbers/menu "Hide Line &Numbers") @@ -1373,7 +1374,7 @@ please adhere to these guidelines: ;; title of this section of the dialog (possibly the word ;; `Collection' should not be translated) (ml-cp-collection-paths "Collection Paths") - + ;; button labels (ml-cp-add "Add") (ml-cp-add-default "Add Default") diff --git a/doc/release-notes/drracket/HISTORY.txt b/doc/release-notes/drracket/HISTORY.txt index 73c95d1c6d..31c6656f26 100644 --- a/doc/release-notes/drracket/HISTORY.txt +++ b/doc/release-notes/drracket/HISTORY.txt @@ -2,11 +2,14 @@ Version 5.2 ------------------------------ - . changed a few menu keybidings: + . changed a three menu keybidings: "New Tab" is now -t "Run" is now -r "Replace" is now -shift-f + The preferences dialog (general tab) has a checkbox to + restore the old behavior. + . added online expansion and check syntax . 2htdp/image: