From ed4036f95db1cdf8c5275617fbb527cf81202fbc Mon Sep 17 00:00:00 2001 From: Tu Do Date: Wed, 21 May 2014 13:46:01 +0700 Subject: [PATCH] Add discover-my-major A better interface for getting information about major mode features. It can complement the built-in "C-h m" (describe-mode): "C-h m" can be thought of a full mode help, while discover-my-major a quick mode help, in the following ways: - Show key binding with description - Cursor is automatically switched to discover-my-major help buffer, and to quit the help buffer, simply press 'q'. In stock "C-h m", user has to manually switch, scroll up/down to look for major mode commands. Finally, user closes the buffer either by "C-x 0", or winner-mode undo (C-c ), which requires more key strokes. - Display just enough information. In "C-h m", it displays every thing, from major mode to minor modes, enabling minor modes and description of every modes. - More polished user interface. It's also better than smex-major-mode-commands, since smex-major-mode-commands does not show key bindings and description. --- core/prelude-mode.el | 1 + core/prelude-packages.el | 1 + 2 files changed, 2 insertions(+) diff --git a/core/prelude-mode.el b/core/prelude-mode.el index 0a172df..c09c2be 100644 --- a/core/prelude-mode.el +++ b/core/prelude-mode.el @@ -65,6 +65,7 @@ (define-key map (kbd "C-c h") 'helm-prelude) (define-key map (kbd "C-c I") 'prelude-find-user-init-file) (define-key map (kbd "C-c S") 'prelude-find-shell-init-file) + (define-key map 'help-command (kbd "C-m") 'discover-my-major) ;; make some use of the Super key (define-key map [?\s-d] 'projectile-find-dir) (define-key map [?\s-p] 'projectile-switch-project) diff --git a/core/prelude-packages.el b/core/prelude-packages.el index bdfb77a..a9360d3 100644 --- a/core/prelude-packages.el +++ b/core/prelude-packages.el @@ -49,6 +49,7 @@ anzu browse-kill-ring dash + discover-my-major diff-hl diminish easy-kill