Mercurial > emacs
comparison lispref/buffers.texi @ 22252:40089afa2b1d
*** empty log message ***
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 26 May 1998 18:56:56 +0000 |
parents | d4ac295a98b3 |
children | 7451b1458af1 |
comparison
equal
deleted
inserted
replaced
22251:5989fa41cda6 | 22252:40089afa2b1d |
---|---|
211 | 211 |
212 If the buffer that used to be current has been killed by the time of | 212 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, | 213 exit from @code{save-current-buffer}, then it is not made current again, |
214 of course. Instead, whichever buffer was current just before exit | 214 of course. Instead, whichever buffer was current just before exit |
215 remains current. | 215 remains current. |
216 @end defmac | 216 @end defspec |
217 | 217 |
218 @defmac with-current-buffer buffer body... | 218 @defmac with-current-buffer buffer body... |
219 @tindex with-current-buffer | 219 @tindex with-current-buffer |
220 The @code{with-current-buffer} macro saves the identity of the current | 220 The @code{with-current-buffer} macro saves the identity of the current |
221 buffer, makes @var{buffer} current, evaluates the @var{body} forms, and | 221 buffer, makes @var{buffer} current, evaluates the @var{body} forms, and |
425 In unusual circumstances, there can be more than one buffer visiting | 425 In unusual circumstances, there can be more than one buffer visiting |
426 the same file name. In such cases, this function returns the first | 426 the same file name. In such cases, this function returns the first |
427 such buffer in the buffer list. | 427 such buffer in the buffer list. |
428 @end defun | 428 @end defun |
429 | 429 |
430 @deffn Command set-visited-file-name filename | 430 @deffn Command set-visited-file-name filename &optional no-query along-with-file |
431 If @var{filename} is a non-empty string, this function changes the | 431 If @var{filename} is a non-empty string, this function changes the |
432 name of the file visited in current buffer to @var{filename}. (If the | 432 name of the file visited in current buffer to @var{filename}. (If the |
433 buffer had no visited file, this gives it one.) The @emph{next time} | 433 buffer had no visited file, this gives it one.) The @emph{next time} |
434 the buffer is saved it will go in the newly-specified file. This | 434 the buffer is saved it will go in the newly-specified file. This |
435 command marks the buffer as modified, since it does not (as far as Emacs | 435 command marks the buffer as modified, since it does not (as far as Emacs |
437 former visited file. | 437 former visited file. |
438 | 438 |
439 If @var{filename} is @code{nil} or the empty string, that stands for | 439 If @var{filename} is @code{nil} or the empty string, that stands for |
440 ``no visited file''. In this case, @code{set-visited-file-name} marks | 440 ``no visited file''. In this case, @code{set-visited-file-name} marks |
441 the buffer as having no visited file. | 441 the buffer as having no visited file. |
442 | |
443 Normally, this function asks the user for confirmation if the specified | |
444 file already exists. If @var{no-query} is non-@code{nil}, that prevents | |
445 asking this question. | |
446 | |
447 If @var{along-with-file} is non-@code{nil}, that means to assume that the | |
448 former visited file has been renamed to @var{filename}. | |
442 | 449 |
443 @c Wordy to avoid overfull hbox. --rjc 16mar92 | 450 @c Wordy to avoid overfull hbox. --rjc 16mar92 |
444 When the function @code{set-visited-file-name} is called interactively, it | 451 When the function @code{set-visited-file-name} is called interactively, it |
445 prompts for @var{filename} in the minibuffer. | 452 prompts for @var{filename} in the minibuffer. |
446 @end deffn | 453 @end deffn |
721 | 728 |
722 To change the order or value of a frame's buffer list, set the frame's | 729 To change the order or value of a frame's buffer list, set the frame's |
723 @code{buffer-list} frame parameter with @code{modify-frame-parameters} | 730 @code{buffer-list} frame parameter with @code{modify-frame-parameters} |
724 (@pxref{Parameter Access}). | 731 (@pxref{Parameter Access}). |
725 | 732 |
726 @defun other-buffer &optional buffer visible-ok | 733 @defun other-buffer &optional buffer visible-ok frame |
727 This function returns the first buffer in the buffer list other than | 734 This function returns the first buffer in the buffer list other than |
728 @var{buffer}. Usually this is the buffer selected most recently (in the | 735 @var{buffer}. Usually this is the buffer selected most recently (in |
729 currently selected frame), aside from @var{buffer}. Buffers whose names | 736 frame @var{frame} or else the currently selected frame), aside from |
730 start with a space are not considered at all. | 737 @var{buffer}. Buffers whose names start with a space are not considered |
738 at all. | |
731 | 739 |
732 If @var{buffer} is not supplied (or if it is not a buffer), then | 740 If @var{buffer} is not supplied (or if it is not a buffer), then |
733 @code{other-buffer} returns the first buffer in the selected frame's | 741 @code{other-buffer} returns the first buffer in the selected frame's |
734 buffer list that is not now visible in any window in a visible frame. | 742 buffer list that is not now visible in any window in a visible frame. |
735 | 743 |
736 If the selected frame has a non-@code{nil} @code{buffer-predicate} | 744 If @var{frame} has a non-@code{nil} @code{buffer-predicate} parameter, |
737 parameter, then @code{other-buffer} uses that predicate to decide which | 745 then @code{other-buffer} uses that predicate to decide which buffers to |
738 buffers to consider. It calls the predicate once for each buffer, and | 746 consider. It calls the predicate once for each buffer, and if the value |
739 if the value is @code{nil}, that buffer is ignored. @xref{Window Frame | 747 is @code{nil}, that buffer is ignored. @xref{Window Frame Parameters}. |
740 Parameters}. | |
741 | 748 |
742 @c Emacs 19 feature | 749 @c Emacs 19 feature |
743 If @var{visible-ok} is @code{nil}, @code{other-buffer} avoids returning | 750 If @var{visible-ok} is @code{nil}, @code{other-buffer} avoids returning |
744 a buffer visible in any window on any visible frame, except as a last | 751 a buffer visible in any window on any visible frame, except as a last |
745 resort. If @var{visible-ok} is non-@code{nil}, then it does not matter | 752 resort. If @var{visible-ok} is non-@code{nil}, then it does not matter |