Skip to content

Commit

Permalink
Make usage message optional
Browse files Browse the repository at this point in the history
  • Loading branch information
muffinmad authored and magnars committed Mar 4, 2020
1 parent 40049c1 commit ea6b4cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions expand-region-core.el
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions expand-region-custom.el
Expand Up @@ -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

0 comments on commit ea6b4cb

Please sign in to comment.