hydra.el (hydra-key-regex): Include "[]" in the char group

To include "]", it must be the first char in the group.
To include "-", it must be the last char in the group.

Fixes #365
master
Oleh Krehel 6 years ago
parent d2b921d067
commit 370a5c613e
  1. 2
      hydra.el

@ -695,7 +695,7 @@ HEAD's binding is returned as a string wrapped with [] or {}."
(defconst hydra-width-spec-regex " ?-?[0-9]*?"
"Regex for the width spec in keys and %` quoted sexps.")
(defvar hydra-key-regex "\\[\\|]\\|[-\\[:alnum:] ~.,;:/|?<>={}*+#%@!&^↑↓←→⌫⌦⏎'`()\"$]+?"
(defvar hydra-key-regex "[][\\[:alnum:] ~.,;:/|?<>={}*+#%@!&^↑↓←→⌫⌦⏎'`()\"$-]+?"
"Regex for the key quoted in the docstring.")
(defun hydra--format (_name body docstring heads)

Loading…
Cancel
Save