Function: vi-quote-words
vi-quote-words is an interactive and byte-compiled function defined in
vi.el.gz.
Signature
(vi-quote-words ARG CHAR)
Documentation
Quote ARG words from the word point is on with pattern specified by CHAR.
Currently, CHAR could be [,{,(,",',`,<,*, etc.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/vi.el.gz
(defun vi-quote-words (arg char)
"Quote ARG words from the word point is on with pattern specified by CHAR.
Currently, CHAR could be [,{,(,\",',`,<,*, etc."
(interactive "*p\nc")
(while (not (string-match "[[({<\"'`*]" (char-to-string char)))
(message "Enter any of [,{,(,<,\",',`,* as quoting character.")
(setq char (read-char)))
(vi-set-last-change-command 'vi-quote-words arg char)
(if (not (looking-at "\\<")) (forward-word -1))
(insert char)
(cond ((char-equal char ?\[) (setq char ?\]))
((char-equal char ?{) (setq char ?}))
((char-equal char ?<) (setq char ?>))
((char-equal char ?\() (setq char ?\)))
((char-equal char ?`) (setq char ?')))
(vi-end-of-word arg)
(forward-char 1)
(insert char))