* lisp/skeleton.el (skeleton-read): Don't insert the skeleton at
an arbitrary point if the user moves around (bug#17752).
(save-excursion (insert "\n")))
(unwind-protect
(setq prompt (cond ((stringp prompt)
- (read-string (format prompt skeleton-subprompt)
- (setq initial-input
- (or initial-input
- (symbol-value 'input)))))
+ ;; The user may issue commands to move
+ ;; around (like `C-M-v'). Ensure that we
+ ;; insert the skeleton at the correct
+ ;; (initial) point.
+ (save-excursion
+ (read-string (format prompt skeleton-subprompt)
+ (setq initial-input
+ (or initial-input
+ (symbol-value 'input))))))
((functionp prompt)
(funcall prompt))
(t (eval prompt))))