From: Michael Kifer Date: Sat, 14 Oct 1995 02:25:42 +0000 (+0000) Subject: (vip-record-kbd-macro): correctly escapes `.' and `[' now. X-Git-Tag: emacs-19.34~2649 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f90edb57db801860dbcceed5147a5244ede1d5db;p=emacs.git (vip-record-kbd-macro): correctly escapes `.' and `[' now. --- 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." (vip-save-string-in-file (format "\n(vip-record-kbd-macro %S '%S %s '%S)" (vip-display-macro macro-name) - state macro-body scope) + state + ;; if we don't let vector macro-body through %S, + ;; the symbols `\.' `\[' etc will be converted into + ;; characters, causing invalid read error on recorded + ;; macros in .vip. + ;; I am not sure is macro-body can still be a string at + ;; this point, but I am preserving this option anyway. + (if (vectorp macro-body) + (format "%S" macro-body) + macro-body) + scope) vip-custom-file-name)) (message msg)