1 |
@c -*-texinfo-*- |
@c -*-texinfo-*- |
2 |
@c This is part of the GNU Emacs Lisp Reference Manual. |
@c This is part of the GNU Emacs Lisp Reference Manual. |
3 |
@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999 |
@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999 |
4 |
@c Free Software Foundation, Inc. |
@c Free Software Foundation, Inc. |
5 |
@c See the file elisp.texi for copying conditions. |
@c See the file elisp.texi for copying conditions. |
6 |
@setfilename ../info/buffers |
@setfilename ../info/buffers |
7 |
@node Buffers, Windows, Backups and Auto-Saving, Top |
@node Buffers, Windows, Backups and Auto-Saving, Top |
138 |
@code{insert-buffer-substring} copies the string from the original |
@code{insert-buffer-substring} copies the string from the original |
139 |
current buffer to the specified (and now current) buffer. |
current buffer to the specified (and now current) buffer. |
140 |
|
|
141 |
If the buffer appended to happens to be displayed in some window, |
If the buffer appended to happens to be displayed in some window, |
142 |
the next redisplay will show how its text has changed. Otherwise, you |
the next redisplay will show how its text has changed. Otherwise, you |
143 |
will not see the change immediately on the screen. The buffer becomes |
will not see the change immediately on the screen. The buffer becomes |
144 |
current temporarily during the execution of the command, but this does |
current temporarily during the execution of the command, but this does |
203 |
@end defun |
@end defun |
204 |
|
|
205 |
@defspec save-current-buffer body... |
@defspec save-current-buffer body... |
206 |
The @code{save-current-buffer} macro saves the identity of the current |
The @code{save-current-buffer} special form saves the identity of the |
207 |
buffer, evaluates the @var{body} forms, and finally restores that buffer |
current buffer, evaluates the @var{body} forms, and finally restores |
208 |
as current. The return value is the value of the last form in |
that buffer as current. The return value is the value of the last |
209 |
@var{body}. The current buffer is restored even in case of an abnormal |
form in @var{body}. The current buffer is restored even in case of an |
210 |
exit via @code{throw} or error (@pxref{Nonlocal Exits}). |
abnormal exit via @code{throw} or error (@pxref{Nonlocal Exits}). |
211 |
|
|
212 |
If the buffer that used to be current has been killed by the time of |
If the buffer that used to be current has been killed by the time of |
213 |
exit from @code{save-current-buffer}, then it is not made current again, |
exit from @code{save-current-buffer}, then it is not made current again, |
307 |
This function returns the buffer specified by @var{buffer-or-name}. |
This function returns the buffer specified by @var{buffer-or-name}. |
308 |
If @var{buffer-or-name} is a string and there is no buffer with that |
If @var{buffer-or-name} is a string and there is no buffer with that |
309 |
name, the value is @code{nil}. If @var{buffer-or-name} is a buffer, it |
name, the value is @code{nil}. If @var{buffer-or-name} is a buffer, it |
310 |
is returned as given; that is not very useful, so the argument is usually |
is returned as given; that is not very useful, so the argument is usually |
311 |
a name. For example: |
a name. For example: |
312 |
|
|
313 |
@example |
@example |
534 |
@comment node-name, next, previous, up |
@comment node-name, next, previous, up |
535 |
@section Comparison of Modification Time |
@section Comparison of Modification Time |
536 |
@cindex comparison of modification time |
@cindex comparison of modification time |
537 |
@cindex modification time, comparison of |
@cindex modification time, comparison of |
538 |
|
|
539 |
Suppose that you visit a file and make changes in its buffer, and |
Suppose that you visit a file and make changes in its buffer, and |
540 |
meanwhile the file itself is changed on disk. At this point, saving the |
meanwhile the file itself is changed on disk. At this point, saving the |
602 |
Depending on the user's answer, the function may return normally, in |
Depending on the user's answer, the function may return normally, in |
603 |
which case the modification of the buffer proceeds, or it may signal a |
which case the modification of the buffer proceeds, or it may signal a |
604 |
@code{file-supersession} error with data @code{(@var{filename})}, in which |
@code{file-supersession} error with data @code{(@var{filename})}, in which |
605 |
case the proposed buffer modification is not allowed. |
case the proposed buffer modification is not allowed. |
606 |
|
|
607 |
This function is called automatically by Emacs on the proper |
This function is called automatically by Emacs on the proper |
608 |
occasions. It exists so you can customize Emacs by redefining it. |
occasions. It exists so you can customize Emacs by redefining it. |
617 |
@cindex buffer, read-only |
@cindex buffer, read-only |
618 |
|
|
619 |
If a buffer is @dfn{read-only}, then you cannot change its contents, |
If a buffer is @dfn{read-only}, then you cannot change its contents, |
620 |
although you may change your view of the contents by scrolling and |
although you may change your view of the contents by scrolling and |
621 |
narrowing. |
narrowing. |
622 |
|
|
623 |
Read-only buffers are used in two kinds of situations: |
Read-only buffers are used in two kinds of situations: |
716 |
;; @r{Note that the name of the minibuffer} |
;; @r{Note that the name of the minibuffer} |
717 |
;; @r{begins with a space!} |
;; @r{begins with a space!} |
718 |
(mapcar (function buffer-name) (buffer-list)) |
(mapcar (function buffer-name) (buffer-list)) |
719 |
@result{} ("buffers.texi" " *Minibuf-1*" |
@result{} ("buffers.texi" " *Minibuf-1*" |
720 |
"buffer.c" "*Help*" "TAGS") |
"buffer.c" "*Help*" "TAGS") |
721 |
@end group |
@end group |
722 |
@end example |
@end example |
982 |
This creates an indirect buffer named @var{name} whose base buffer |
This creates an indirect buffer named @var{name} whose base buffer |
983 |
is @var{base-buffer}. The argument @var{base-buffer} may be a buffer |
is @var{base-buffer}. The argument @var{base-buffer} may be a buffer |
984 |
or a string. |
or a string. |
985 |
|
|
986 |
If @var{base-buffer} is an indirect buffer, its base buffer is used as |
If @var{base-buffer} is an indirect buffer, its base buffer is used as |
987 |
the base for the new buffer. |
the base for the new buffer. |
988 |
@end deffn |
@end deffn |