diff options
| author | Dmitry Gutov | 2024-02-07 21:50:37 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2024-02-07 21:50:53 +0200 |
| commit | f444786e58737a4ae6071957dfc60075bbd96edc (patch) | |
| tree | 32003bb2a9fd19f1757911390f185f480567d08e /src | |
| parent | 2ecaa60f0521446c9d2c054a3493faaf46275223 (diff) | |
| download | emacs-f444786e58737a4ae6071957dfc60075bbd96edc.tar.gz emacs-f444786e58737a4ae6071957dfc60075bbd96edc.zip | |
Mention 'C-h' in echo for unfinished commands
* etc/NEWS: Mention it here.
* lisp/cus-start.el (standard): Add type and version for it.
* src/keyboard.c (echo-keystrokes-help): New user option
(https://lists.gnu.org/archive/html/emacs-devel/2024-02/msg00174.html).
* src/keyboard.c (echo_dash): Use it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 1f7253a7da1..6d3db5ab615 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -589,6 +589,15 @@ echo_dash (void) | |||
| 589 | AUTO_STRING (dash, "-"); | 589 | AUTO_STRING (dash, "-"); |
| 590 | kset_echo_string (current_kboard, | 590 | kset_echo_string (current_kboard, |
| 591 | concat2 (KVAR (current_kboard, echo_string), dash)); | 591 | concat2 (KVAR (current_kboard, echo_string), dash)); |
| 592 | |||
| 593 | if (echo_keystrokes_help) | ||
| 594 | { | ||
| 595 | AUTO_STRING (help, " (\\`C-h' for help)"); | ||
| 596 | kset_echo_string (current_kboard, | ||
| 597 | concat2 (KVAR (current_kboard, echo_string), | ||
| 598 | calln (Qsubstitute_command_keys, help))); | ||
| 599 | } | ||
| 600 | |||
| 592 | echo_now (); | 601 | echo_now (); |
| 593 | } | 602 | } |
| 594 | 603 | ||
| @@ -13228,6 +13237,10 @@ The value may be integer or floating point. | |||
| 13228 | If the value is zero, don't echo at all. */); | 13237 | If the value is zero, don't echo at all. */); |
| 13229 | Vecho_keystrokes = make_fixnum (1); | 13238 | Vecho_keystrokes = make_fixnum (1); |
| 13230 | 13239 | ||
| 13240 | DEFVAR_BOOL ("echo-keystrokes-help", echo_keystrokes_help, | ||
| 13241 | doc: /* Non-nil means append small help text to the unfinished commands' echo. */); | ||
| 13242 | echo_keystrokes_help = true; | ||
| 13243 | |||
| 13231 | DEFVAR_LISP ("polling-period", Vpolling_period, | 13244 | DEFVAR_LISP ("polling-period", Vpolling_period, |
| 13232 | doc: /* Interval between polling for input during Lisp execution. | 13245 | doc: /* Interval between polling for input during Lisp execution. |
| 13233 | The reason for polling is to make C-g work to stop a running program. | 13246 | The reason for polling is to make C-g work to stop a running program. |