summaryrefslogtreecommitdiff
path: root/lisp/progmodes/vhdl-mode.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2022-04-30 10:10:07 +0300
committerEli Zaretskii <eliz@gnu.org>2022-04-30 10:10:07 +0300
commit1648791e7c828ce8ced69976e4d88430bf284cf8 (patch)
tree641d7a003167ccd465fdb1bc8645be9855eb259f /lisp/progmodes/vhdl-mode.el
parent0ce48e2882ad73925f9b524d879d8e57909e6d38 (diff)
downloademacs-1648791e7c828ce8ced69976e4d88430bf284cf8.tar.gz
Fix use of kp-decimal in 'vhdl-stutter-mode'
* lisp/progmodes/vhdl-mode.el (vhdl-electric-period): Avoid signaling an error when the user presses the kp-decimal key on the numeric pad in 'vhdl-stutter-mode'. (Bug#55079)
Diffstat (limited to 'lisp/progmodes/vhdl-mode.el')
-rw-r--r--lisp/progmodes/vhdl-mode.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 642aad509c4..cdc8aeb1763 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -8785,7 +8785,10 @@ project is defined."
(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)
+ ;; We use this-command-keys below to account for translation of
+ ;; kp-decimal into '.'; vhdl-last-input-event doesn't catch
+ ;; that.
+ (cond ((eq (preceding-char) (aref (this-command-keys) 0))
(progn (delete-char -1)
(unless (eq (preceding-char) ? ) (insert " "))
(insert "=> ")))