From 32354c79c5ecebabf8d9ca5efa7c10f2cae4be4a Mon Sep 17 00:00:00 2001 From: Huang Bin Date: Tue, 3 May 2016 11:14:31 +0800 Subject: [PATCH] Fix the crux-like changes (#995) --- README.md | 4 ++-- core/prelude-custom.el | 4 ++-- core/prelude-global-keybindings.el | 5 ++--- core/prelude-mode.el | 22 +++++++++++----------- modules/prelude-programming.el | 2 +- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 32dfcc3..ecc7aa4 100644 --- a/README.md +++ b/README.md @@ -265,7 +265,7 @@ Keybinding | Description C-+ | Increase font size(`text-scale-increase`). C-- | Decrease font size(`text-scale-decrease`). C-x O | Go back to previous window (the inverse of `other-window` (`C-x o`)). -C-^ | Join two lines into one(`prelude-top-join-line`). +C-^ | Join two lines into one(`crux-top-join-line`). C-x p | Start `proced` (manage processes from Emacs; works only in Linux). C-x m | Start `eshell`. C-x M-m | Start your default shell. @@ -432,7 +432,7 @@ Keybinding | Description jj | Jump to the beginning of a word(`avy-goto-word-1`) jk | Jump to a character(`avy-goto-char`) jl | Jump to the beginning of a line(`avy-goto-line`) -JJ | Jump back to previous buffer(`prelude-switch-to-previous-buffer`) +JJ | Jump back to previous buffer(`crux-switch-to-previous-buffer`) uu | View edits as a tree(`undo-tree-visualize`) xx | Executed extended command(`execute-extended-command`) yy | Browse the kill ring(`browse-kill-ring`) diff --git a/core/prelude-custom.el b/core/prelude-custom.el index 07b7c02..74759cf 100644 --- a/core/prelude-custom.el +++ b/core/prelude-custom.el @@ -70,7 +70,7 @@ Will only occur if `prelude-whitespace' is also enabled." Prelude recommends you only put personal customizations in the personal folder. This variable allows you to specify a specific folder as the one that should be visited when running -`prelude-find-user-init-file'. This can be easily set to the desired buffer +`crux-find-user-init-file'. This can be easily set to the desired buffer in lisp by putting `(setq prelude-user-init-file load-file-name)' in the desired elisp file." :type 'string @@ -99,7 +99,7 @@ Only modes that don't derive from `prog-mode' should be listed here." :group 'prelude) (defcustom prelude-shell (getenv "SHELL") - "The default shell to run with `prelude-visit-term-buffer'" + "The default shell to run with `crux-visit-term-buffer'" :type 'string :group 'prelude) diff --git a/core/prelude-global-keybindings.el b/core/prelude-global-keybindings.el index b17295f..c50c5d4 100644 --- a/core/prelude-global-keybindings.el +++ b/core/prelude-global-keybindings.el @@ -45,8 +45,7 @@ (other-window -1))) ;; back one ;; Indentation help -(global-set-key (kbd "C-^") 'prelude-top-join-line) - +(global-set-key (kbd "C-^") 'crux-top-join-line) ;; Start proced in a similar manner to dired (unless (eq system-type 'darwin) (global-set-key (kbd "C-x p") 'proced)) @@ -86,7 +85,7 @@ (kill-line 0) (indent-according-to-mode))) -(global-set-key [remap kill-whole-line] 'prelude-kill-whole-line) +(global-set-key [remap kill-whole-line] 'crux-kill-whole-line) ;; Activate occur easily inside isearch (define-key isearch-mode-map (kbd "C-o") 'isearch-occur) diff --git a/core/prelude-mode.el b/core/prelude-mode.el index 8320332..6f5ca8a 100644 --- a/core/prelude-mode.el +++ b/core/prelude-mode.el @@ -88,31 +88,31 @@ (easy-menu-add-item nil '("Tools") '("Prelude" ("Files" - ["Open with..." prelude-open-with] - ["Delete file and buffer" prelude-delete-file-and-buffer] - ["Rename buffer and file" prelude-rename-buffer-and-file]) + ["Open with..." crux-open-with] + ["Delete file and buffer" crux-delete-file-and-buffer] + ["Rename buffer and file" crux-rename-buffer-and-file]) ("Buffers" - ["Clean up buffer or region" prelude-cleanup-buffer-or-region] - ["Kill other buffers" prelude-kill-other-buffers]) + ["Clean up buffer or region" crux-cleanup-buffer-or-region] + ["Kill other buffers" crux-kill-other-buffers]) ("Editing" ["Insert empty line" prelude-insert-empty-line] ["Move line up" prelude-move-line-up] ["Move line down" prelude-move-line-down] ["Duplicate line or region" prelude-duplicate-current-line-or-region] - ["Indent rigidly and copy to clipboard" prelude-indent-rigidly-and-copy-to-clipboard] - ["Insert date" prelude-insert-date] - ["Eval and replace" prelude-eval-and-replace] + ["Indent rigidly and copy to clipboard" crux-indent-rigidly-and-copy-to-clipboard] + ["Insert date" crux-insert-date] + ["Eval and replace" crux-eval-and-replace] ) ("Windows" - ["Swap windows" prelude-swap-windows]) + ["Swap windows" crux-swap-windows]) ("General" - ["Visit term buffer" prelude-visit-term-buffer] + ["Visit term buffer" crux-visit-term-buffer] ["Search in Google" prelude-google] - ["View URL" prelude-view-url])) + ["View URL" crux-view-url])) "Search Files (Grep)...") (easy-menu-add-item nil '("Tools") '("--") "Search Files (Grep)...")) diff --git a/modules/prelude-programming.el b/modules/prelude-programming.el index 9af55a7..dd16ac0 100644 --- a/modules/prelude-programming.el +++ b/modules/prelude-programming.el @@ -60,7 +60,7 @@ This functions should be added to the hooks of major modes for programming." ;; smart curly braces (sp-pair "{" nil :post-handlers '(((lambda (&rest _ignored) - (prelude-smart-open-line-above)) "RET"))) + (crux-smart-open-line-above)) "RET"))) ;; enlist a more liberal guru (setq guru-warn-only t)