From: Eli Zaretskii <eliz@gnu.org>
To: Cyril Arnould <cyril.arnould@outlook.com>,
Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 55079@debbugs.gnu.org
Subject: bug#55079: 28.1; kp-decimal not working in vhdl-stutter-mode
Date: Sat, 23 Apr 2022 14:28:05 +0300 [thread overview]
Message-ID: <83zgkcninu.fsf@gnu.org> (raw)
In-Reply-To: <AS4PR10MB61102EE607A8B4BA6961A272E3F69@AS4PR10MB6110.EURPRD10.PROD.OUTLOOK.COM> (message from Cyril Arnould on Sat, 23 Apr 2022 09:47:03 +0000)
> From: Cyril Arnould <cyril.arnould@outlook.com>
> Date: Sat, 23 Apr 2022 09:47:03 +0000
>
> This bug has been around forever, it just never occurred to me to file
> a report for it. To reproduce the error:
>
> 1. Open an empty .vhd file
> 2. Enable vhdl-stutter-mode (C-c RET C-s)
> 3. With Num Lock on, press the kp-decimal key.
>
> Instead of it printing a dot, I receive the following error message:
>
> funcall-interactively: Wrong type argument: number-or-marker-p,
> kp-decimal
>
> If vhdl-stutter-mode is off, the key will print a dot as expected. As a
> workaround, I have remapped [kp-decimal] to [?.] in my .emacs file.
Does the patch below give good results?
Stefan, is this too kludgey? if so, is there a more elegant way?
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 642aad5..76eb801 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -8785,7 +8785,13 @@ vhdl-electric-comma
(defun vhdl-electric-period (count) "`..' --> ` => '"
(interactive "p")
(if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal)))
- (cond ((= (preceding-char) vhdl-last-input-event)
+ (cond ((or (and (integerp vhdl-last-input-event)
+ (= (preceding-char) vhdl-last-input-event))
+ (and (eq vhdl-last-input-event 'kp-decimal)
+ (equal (lookup-key local-function-key-map
+ (vector vhdl-last-input-event))
+ [?.])
+ (= (preceding-char) ?.)))
(progn (delete-char -1)
(unless (eq (preceding-char) ? ) (insert " "))
(insert "=> ")))
next prev parent reply other threads:[~2022-04-23 11:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-23 9:47 bug#55079: 28.1; kp-decimal not working in vhdl-stutter-mode Cyril Arnould
2022-04-23 11:28 ` Eli Zaretskii [this message]
2022-04-23 12:57 ` bug#55079: AW: " Cyril Arnould
2022-04-23 13:15 ` Eli Zaretskii
2022-04-23 13:27 ` bug#55079: AW: " Cyril Arnould
2022-04-23 20:21 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-23 22:22 ` bug#55079: AW: " Cyril Arnould
2022-04-24 5:18 ` Eli Zaretskii
2022-04-24 20:17 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-30 7:12 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83zgkcninu.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=55079@debbugs.gnu.org \
--cc=cyril.arnould@outlook.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.