aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kifer1995-10-14 02:25:42 +0000
committerMichael Kifer1995-10-14 02:25:42 +0000
commitf90edb57db801860dbcceed5147a5244ede1d5db (patch)
tree4bc75a354c1b455c28052e062e9012b7706c785e
parentc6b52c46457a89a8c5f659549be01ed0948ffd39 (diff)
downloademacs-f90edb57db801860dbcceed5147a5244ede1d5db.tar.gz
emacs-f90edb57db801860dbcceed5147a5244ede1d5db.zip
(vip-record-kbd-macro): correctly escapes `.' and `[' now.
-rw-r--r--lisp/emulation/viper-macs.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/emulation/viper-macs.el b/lisp/emulation/viper-macs.el
index 0f0b0cdba7a..5b8db6a773f 100644
--- a/lisp/emulation/viper-macs.el
+++ b/lisp/emulation/viper-macs.el
@@ -395,7 +395,17 @@ If SCOPE is nil, the user is asked to specify the scope."
395 (vip-save-string-in-file 395 (vip-save-string-in-file
396 (format "\n(vip-record-kbd-macro %S '%S %s '%S)" 396 (format "\n(vip-record-kbd-macro %S '%S %s '%S)"
397 (vip-display-macro macro-name) 397 (vip-display-macro macro-name)
398 state macro-body scope) 398 state
399 ;; if we don't let vector macro-body through %S,
400 ;; the symbols `\.' `\[' etc will be converted into
401 ;; characters, causing invalid read error on recorded
402 ;; macros in .vip.
403 ;; I am not sure is macro-body can still be a string at
404 ;; this point, but I am preserving this option anyway.
405 (if (vectorp macro-body)
406 (format "%S" macro-body)
407 macro-body)
408 scope)
399 vip-custom-file-name)) 409 vip-custom-file-name))
400 410
401 (message msg) 411 (message msg)