comparison lisp/subr.el @ 4516:e96f3aca4d63

Document initial position of point in `with-string-as-buffer-contents'.
author Stephen J. Turnbull <stephen@xemacs.org>
date Sat, 27 Sep 2008 16:31:32 +0900
parents b82fdf7305ee
children eecd28508f4a
comparison
equal deleted inserted replaced
4507:83e35df20028 4516:e96f3aca4d63
643 643
644 644
645 ;; Moved from mule-coding.el. 645 ;; Moved from mule-coding.el.
646 (defmacro with-string-as-buffer-contents (str &rest body) 646 (defmacro with-string-as-buffer-contents (str &rest body)
647 "With the contents of the current buffer being STR, run BODY. 647 "With the contents of the current buffer being STR, run BODY.
648 Point starts positioned to end of buffer.
648 Returns the new contents of the buffer, as modified by BODY. 649 Returns the new contents of the buffer, as modified by BODY.
649 The original current buffer is restored afterwards." 650 The original current buffer is restored afterwards."
650 `(with-temp-buffer 651 `(with-temp-buffer
651 (insert ,str) 652 (insert ,str)
652 ,@body 653 ,@body