]> code.delx.au - gnu-emacs/blobdiff - lisp/emulation/viper-macs.el
(tempo-local-tags, tempo-user-elements, tempo-use-tag-list):
[gnu-emacs] / lisp / emulation / viper-macs.el
index 0f0b0cdba7a4caf3550bd2433b0fc99fb2f1fec1..39130edef69073061f88a25d25da0b8cfc7f6905 100644 (file)
@@ -1,4 +1,5 @@
-;;; viper-macs.el -- functions implementing keyboard macros for Viper
+;;; viper-macs.el --- functions implementing keyboard macros for Viper
+
 ;; Copyright (C) 1994, 1995 Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
@@ -395,7 +396,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)