[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: insert-buffer vs insert-buffer-substring
From: |
Richard M. Stallman |
Subject: |
Re: insert-buffer vs insert-buffer-substring |
Date: |
Tue, 09 Aug 2005 17:46:32 -0400 |
I just fixed a bug in info.el caused by replacing `insert-buffer' with
`insert-buffer-substring'. Instead of `(insert-buffer-substring buffer)',
Sorry. I didn't see that the change caused a problem.
I added the following construct:
(goto-char (prog1 (point) (insert-buffer-substring buffer)))
That is rather idiomatic. I would prefer
(let ((foo (point)))
(insert-buffer-substring buffer)
(goto-char (point)))
However, for this particular job, you can do
(save-excursion
(insert-buffer-substring buffer))