branch: scratch/expand-region commit ea6b4cbb9985ddae532bd2faf9bb00570c9f2781 Author: muffinmad <andreyk....@gmail.com> Commit: Magnar Sveen <magn...@gmail.com>
Make usage message optional --- expand-region-core.el | 4 ++-- expand-region-custom.el | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/expand-region-core.el b/expand-region-core.el index 16669d00d6..c13b9bc273 100644 --- a/expand-region-core.el +++ b/expand-region-core.el @@ -210,10 +210,10 @@ before calling `er/expand-region' for the first time." `(lambda () (interactive) (setq this-command `,(cadr ',binding)) - (or (minibufferp) (message "%s" ,msg)) + (or (not expand-region-show-usage-message) (minibufferp) (message "%s" ,msg)) (eval `,(cdr ',binding)))))) t) - (or (minibufferp) (message "%s" msg))))) + (or (not expand-region-show-usage-message) (minibufferp) (message "%s" msg))))) (if (fboundp 'set-temporary-overlay-map) (fset 'er/set-temporary-overlay-map 'set-temporary-overlay-map) diff --git a/expand-region-custom.el b/expand-region-custom.el index 6d01bd2d6e..a6a5d1567f 100644 --- a/expand-region-custom.el +++ b/expand-region-custom.el @@ -115,6 +115,11 @@ If set to nil, always place the cursor at the beginning of the region." :type '(choice (const :tag "Enable subword expansions" t) (const :tag "Disable subword expansions" nil))) +(defcustom expand-region-show-usage-message t + "Whether expand-region should show usage message." + :group 'expand-region + :type 'boolean) + (provide 'expand-region-custom) ;;; expand-region-custom.el ends here