comparison lisp/emulation/viper-macs.el @ 13211:76308c9753ab

(vip-record-kbd-macro): correctly escapes `.' and `[' now.
author Michael Kifer <kifer@cs.stonybrook.edu>
date Sat, 14 Oct 1995 02:25:42 +0000
parents 3d339e94aece
children 84acc3adcd63
comparison
equal deleted inserted replaced
13210:8453192a1032 13211:76308c9753ab
393 (if (y-or-n-p (format "Save this macro in %s? " 393 (if (y-or-n-p (format "Save this macro in %s? "
394 (abbreviate-file-name vip-custom-file-name))) 394 (abbreviate-file-name vip-custom-file-name)))
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)
402 )) 412 ))
403 413