diff options
author | Michael Kifer <kifer@cs.stonybrook.edu> | 1995-10-14 02:25:42 +0000 |
---|---|---|
committer | Michael Kifer <kifer@cs.stonybrook.edu> | 1995-10-14 02:25:42 +0000 |
commit | f5e03054d670c4750d4503b950c2629f188a4320 (patch) | |
tree | b0f049ff66ec27373774c2f57b6f85fedcd4c99b /lisp/emulation/viper-macs.el | |
parent | 188aa695c62be87867e3126661db01b59d40dac0 (diff) | |
download | emacs-f5e03054d670c4750d4503b950c2629f188a4320.tar.gz |
(vip-record-kbd-macro): correctly escapes `.' and `[' now.
Diffstat (limited to 'lisp/emulation/viper-macs.el')
-rw-r--r-- | lisp/emulation/viper-macs.el | 12 |
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." (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) |