summaryrefslogtreecommitdiff
path: root/lisp/progmodes/vhdl-mode.el
diff options
context:
space:
mode:
authorDavid Kastrup <dak@gnu.org>2015-07-25 18:54:42 +0200
committerDavid Kastrup <dak@gnu.org>2015-08-04 14:34:15 +0200
commit5022e27dac4c13651941e425dbec5b3a2cecdae4 (patch)
tree696d748c8abc3aea1bfd5305a8e71dc985053496 /lisp/progmodes/vhdl-mode.el
parent227e996946d4629fa8f6d665564a37668290c87f (diff)
downloademacs-5022e27dac4c13651941e425dbec5b3a2cecdae4.tar.gz
; Do not overwrite preexisting contents of unread-command-events
Diffstat (limited to 'lisp/progmodes/vhdl-mode.el')
-rw-r--r--lisp/progmodes/vhdl-mode.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 16e4e8ed53d..2edacf4e69a 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -8734,10 +8734,11 @@ is omitted or nil."
(let ((next-input (read-char)))
(if (= next-input ?-) ; four dashes
(vhdl-comment-display t)
- (setq unread-command-events ; pushback the char
- (list (vhdl-character-to-event next-input))))))
- (setq unread-command-events ; pushback the char
- (list (vhdl-character-to-event next-input)))
+ (push (vhdl-character-to-event next-input)
+ ; pushback the char
+ unread-command-events))))
+ (push (vhdl-character-to-event next-input) ; pushback the char
+ unread-command-events)
(vhdl-comment-insert)))))
(self-insert-command count)))
@@ -10755,8 +10756,8 @@ If starting after end-comment-column, start a new line."
(setq code t))
(unless code
(insert "--")) ; hardwire to 1 space or use vhdl-basic-offset?
- (setq unread-command-events
- (list (vhdl-character-to-event next-input)))))) ; pushback the char
+ (push (vhdl-character-to-event next-input) ; pushback the char
+ unread-command-events))))
(defun vhdl-comment-display (&optional line-exists)
"Add 2 comment lines at the current indent, making a display comment."
@@ -11310,8 +11311,8 @@ but not if inside a comment or quote."
;; delete CR which is still in event queue
(if (fboundp 'enqueue-eval-event)
(enqueue-eval-event 'delete-char -1)
- (setq unread-command-events ; push back a delete char
- (list (vhdl-character-to-event ?\177))))))))
+ (push (vhdl-character-to-event ?\177) ; push back a delete char
+ unread-command-events))))))
(defun vhdl-template-alias-hook ()
(vhdl-hooked-abbrev 'vhdl-template-alias))