aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2017-10-16 19:36:06 +0300
committerEli Zaretskii2017-10-16 19:36:06 +0300
commitdb68cefe72e5c68fa81796028a52de1b8e6480aa (patch)
treeb818283761d3eff9c2c18fe55ccdc186dc180bcf
parentc63b344c3d5f6278a189a16099ee6310fad9fbd7 (diff)
downloademacs-db68cefe72e5c68fa81796028a52de1b8e6480aa.tar.gz
emacs-db68cefe72e5c68fa81796028a52de1b8e6480aa.zip
Fix errors in kmacro.el post-command-hook
* lisp/kmacro.el (kmacro-step-edit-active): Initialize to nil to avoid 'void-variable' errors. (Bug#28818) * test/lisp/kmacro-tests.el (kmacro-tests-step-edit-cleans-up-hook): Now succeeds. (Bug#18708)
-rw-r--r--lisp/kmacro.el2
-rw-r--r--test/lisp/kmacro-tests.el1
2 files changed, 1 insertions, 2 deletions
diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index 582a58eda1c..4abc571db44 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -937,7 +937,7 @@ without repeating the prefix."
937 937
938;;; Single-step editing of keyboard macros 938;;; Single-step editing of keyboard macros
939 939
940(defvar kmacro-step-edit-active) ;; step-editing active 940(defvar kmacro-step-edit-active nil) ;; step-editing active
941(defvar kmacro-step-edit-new-macro) ;; storage for new macro 941(defvar kmacro-step-edit-new-macro) ;; storage for new macro
942(defvar kmacro-step-edit-inserting) ;; inserting into macro 942(defvar kmacro-step-edit-inserting) ;; inserting into macro
943(defvar kmacro-step-edit-appending) ;; append to end of macro 943(defvar kmacro-step-edit-appending) ;; append to end of macro
diff --git a/test/lisp/kmacro-tests.el b/test/lisp/kmacro-tests.el
index 9f3eeafe486..690d5029231 100644
--- a/test/lisp/kmacro-tests.el
+++ b/test/lisp/kmacro-tests.el
@@ -818,7 +818,6 @@ This is a regression for item 7 in Bug#24991."
818 818
819(kmacro-tests-deftest kmacro-tests-step-edit-cleans-up-hook () 819(kmacro-tests-deftest kmacro-tests-step-edit-cleans-up-hook ()
820 "Step-editing properly cleans up `post-command-hook.' (Bug #18708)" 820 "Step-editing properly cleans up `post-command-hook.' (Bug #18708)"
821 (:expected-result :failed)
822 (let (post-command-hook) 821 (let (post-command-hook)
823 (setq-local post-command-hook '(t)) 822 (setq-local post-command-hook '(t))
824 (kmacro-tests-run-step-edit "x" 823 (kmacro-tests-run-step-edit "x"