Mercurial > emacs
comparison lispref/buffers.texi @ 90100:72cf6261961e
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-11
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-69
- miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-71
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-72
src/dispextern.h (xassert): Enable unconditionally.
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-73
- miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-81
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-82
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-12
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-13
Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sun, 06 Feb 2005 12:06:02 +0000 |
parents | 95879cc1ed20 134cd8afb3e7 |
children | e1fbb019c538 |
comparison
equal
deleted
inserted
replaced
90099:fa9654493afb | 90100:72cf6261961e |
---|---|
342 produces a name not currently in use for any buffer by appending a | 342 produces a name not currently in use for any buffer by appending a |
343 number inside of @samp{<@dots{}>}. It starts at 2 and keeps | 343 number inside of @samp{<@dots{}>}. It starts at 2 and keeps |
344 incrementing the number until it is not the name of an existing buffer. | 344 incrementing the number until it is not the name of an existing buffer. |
345 | 345 |
346 If the optional second argument @var{ignore} is non-@code{nil}, it | 346 If the optional second argument @var{ignore} is non-@code{nil}, it |
347 should be a string; it makes a difference if it is a name in the | 347 should be a string, a potential buffer name. It means to consider |
348 sequence of names to be tried. That name will be considered acceptable, | 348 that potential buffer acceptable, if it is tried, even it is the name |
349 if it is tried, even if a buffer with that name exists. Thus, if | 349 of an existing buffer (which would normally be rejected). Thus, if |
350 buffers named @samp{foo}, @samp{foo<2>}, @samp{foo<3>} and @samp{foo<4>} | 350 buffers named @samp{foo}, @samp{foo<2>}, @samp{foo<3>} and |
351 exist, | 351 @samp{foo<4>} exist, |
352 | 352 |
353 @example | 353 @example |
354 (generate-new-buffer-name "foo") | 354 (generate-new-buffer-name "foo") |
355 @result{} "foo<5>" | 355 @result{} "foo<5>" |
356 (generate-new-buffer-name "foo" "foo<3>") | 356 (generate-new-buffer-name "foo" "foo<3>") |
627 This function returns the current buffer's recorded last file | 627 This function returns the current buffer's recorded last file |
628 modification time, as a list of the form @code{(@var{high} @var{low})}. | 628 modification time, as a list of the form @code{(@var{high} @var{low})}. |
629 (This is the same format that @code{file-attributes} uses to return | 629 (This is the same format that @code{file-attributes} uses to return |
630 time values; see @ref{File Attributes}.) | 630 time values; see @ref{File Attributes}.) |
631 | 631 |
632 The function returns zero if the buffer has no recorded last | 632 If the buffer has no recorded last modification time, this function |
633 modification time, which can happen, for instance, if the record has | 633 returns zero. This case occurs, for instance, if the buffer is not |
634 been explicitly cleared by @code{clear-visited-file-modtime} or if the | 634 visiting a file or if the time has been explicitly cleared by |
635 buffer is not visiting a file. Note, however, that | 635 @code{clear-visited-file-modtime}. Note, however, that |
636 @code{visited-file-modtime} can return a non-zero value for some | 636 @code{visited-file-modtime} returns a list for some non-file buffers |
637 buffers that are not visiting files, but are nevertheless closely | 637 too. For instance, in a Dired buffer listing a directory, it returns |
638 associated with a file. This happens, for instance, with dired | 638 the last modification time of that directory, as recorded by Dired. |
639 buffers listing a directory. For such buffers, | |
640 @code{visited-file-modtime} returns the last modification time of that | |
641 directory, as recorded by dired. | |
642 | 639 |
643 For a new buffer visiting a not yet existing file, @var{high} is | 640 For a new buffer visiting a not yet existing file, @var{high} is |
644 @minus{}1 and @var{low} is 65535, that is, | 641 @minus{}1 and @var{low} is 65535, that is, |
645 @ifnottex | 642 @ifnottex |
646 @w{2**16 - 1.} | 643 @w{2**16 - 1.} |
855 | 852 |
856 @deffn Command bury-buffer &optional buffer-or-name | 853 @deffn Command bury-buffer &optional buffer-or-name |
857 This function puts @var{buffer-or-name} at the end of the buffer list, | 854 This function puts @var{buffer-or-name} at the end of the buffer list, |
858 without changing the order of any of the other buffers on the list. | 855 without changing the order of any of the other buffers on the list. |
859 This buffer therefore becomes the least desirable candidate for | 856 This buffer therefore becomes the least desirable candidate for |
860 @code{other-buffer} to return. | 857 @code{other-buffer} to return. The argument can be either a buffer |
858 itself or the name of one. | |
861 | 859 |
862 @code{bury-buffer} operates on each frame's @code{buffer-list} parameter | 860 @code{bury-buffer} operates on each frame's @code{buffer-list} parameter |
863 as well as the frame-independent Emacs buffer list; therefore, the | 861 as well as the frame-independent Emacs buffer list; therefore, the |
864 buffer that you bury will come last in the value of @code{(buffer-list | 862 buffer that you bury will come last in the value of @code{(buffer-list |
865 @var{frame})} and in the value of @code{(buffer-list nil)}. | 863 @var{frame})} and in the value of @code{(buffer-list nil)}. |
947 @node Killing Buffers | 945 @node Killing Buffers |
948 @section Killing Buffers | 946 @section Killing Buffers |
949 @cindex killing buffers | 947 @cindex killing buffers |
950 @cindex buffers, killing | 948 @cindex buffers, killing |
951 | 949 |
952 @dfn{Killing a buffer} makes its name unknown to Emacs and makes its | 950 @dfn{Killing a buffer} makes its name unknown to Emacs and makes the |
953 text space available for other use. | 951 memory space it occupied available for other use. |
954 | 952 |
955 The buffer object for the buffer that has been killed remains in | 953 The buffer object for the buffer that has been killed remains in |
956 existence as long as anything refers to it, but it is specially marked | 954 existence as long as anything refers to it, but it is specially marked |
957 so that you cannot make it current or display it. Killed buffers retain | 955 so that you cannot make it current or display it. Killed buffers retain |
958 their identity, however; if you kill two distinct buffers, they remain | 956 their identity, however; if you kill two distinct buffers, they remain |
1099 the base for the new buffer. If, in addition, @var{clone} is | 1097 the base for the new buffer. If, in addition, @var{clone} is |
1100 non-@code{nil}, the initial state is copied from the actual base | 1098 non-@code{nil}, the initial state is copied from the actual base |
1101 buffer, not from @var{base-buffer}. | 1099 buffer, not from @var{base-buffer}. |
1102 @end deffn | 1100 @end deffn |
1103 | 1101 |
1102 @defun clone-indirect-buffer newname display-flag &optional norecord | |
1103 This function creates and returns a new indirect buffer that shares | |
1104 the current buffer's base buffer and copies the rest of the current | |
1105 buffer's attributes. (If the current buffer is not indirect, it is | |
1106 used as the base buffer.) | |
1107 | |
1108 If @var{display-flag} is non-@code{nil}, that means to display the new | |
1109 buffer by calling @code{pop-to-buffer}. If @var{norecord} is | |
1110 non-@code{nil}, that means not to put the new buffer to the front of | |
1111 the buffer list. | |
1112 @end defun | |
1113 | |
1104 @defun buffer-base-buffer &optional buffer | 1114 @defun buffer-base-buffer &optional buffer |
1105 This function returns the base buffer of @var{buffer}, which defaults | 1115 This function returns the base buffer of @var{buffer}, which defaults |
1106 to the current buffer. If @var{buffer} is not indirect, the value is | 1116 to the current buffer. If @var{buffer} is not indirect, the value is |
1107 @code{nil}. Otherwise, the value is another buffer, which is never an | 1117 @code{nil}. Otherwise, the value is another buffer, which is never an |
1108 indirect buffer. | 1118 indirect buffer. |