From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: revert-buffer without question? Date: Thu, 24 Feb 2005 16:03:58 -0700 Message-ID: <3874r3F5leqq2U1@individual.net> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1109286170 3651 80.91.229.2 (24 Feb 2005 23:02:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 24 Feb 2005 23:02:50 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 25 00:02:50 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D4S0D-0005VZ-Go for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Feb 2005 00:02:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D4SHq-0005dl-J2 for geh-help-gnu-emacs@m.gmane.org; Thu, 24 Feb 2005 18:20:50 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 48 Original-X-Trace: individual.net odE5kYPNcA195s53KkZV3Qf0xCeNE46C4kB4UYGUcTgIiXQjA= User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: Original-Xref: shelby.stanford.edu gnu.emacs.help:128789 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: main.gmane.org gmane.emacs.help:24328 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:24328 Toni K. Trampert wrote: >Phillip Lord wrote: >>(defun revert-buffer-noask() >> (interactive) >> (revert-buffer nil t)) >> >>should do it. > > It does it. > > What is the meaning of the "nil t" construction? ,----[ C-h f revert-buffer RET ] | revert-buffer is an interactive compiled Lisp function in `files'. | (revert-buffer &optional IGNORE-AUTO NOCONFIRM PRESERVE-MODES) | | Replace current buffer text with the text of the visited file on disk. | This undoes all changes since the file was visited or saved. | With a prefix argument, offer to revert from latest auto-save file, if | that is more recent than the visited file. | | This command also works for special buffers that contain text which | doesn't come from a file, but reflects some other data base instead: | for example, Dired buffers and buffer-list buffers. In these cases, | it reconstructs the buffer contents from the appropriate data base. | | When called from Lisp, the first argument is IGNORE-AUTO; only offer | to revert from the auto-save file when this is nil. Note that the | sense of this argument is the reverse of the prefix argument, for the | sake of backward compatibility. IGNORE-AUTO is optional, defaulting | to nil. | | Optional second argument NOCONFIRM means don't ask for confirmation at | all. (The local variable `revert-without-query', if non-nil, prevents | confirmation.) | | Optional third argument PRESERVE-MODES non-nil means don't alter | the files modes. Normally we reinitialize them using `normal-mode'. | | If the value of `revert-buffer-function' is non-nil, it is called to | do all the work for this command. Otherwise, the hooks | `before-revert-hook' and `after-revert-hook' are run at the beginning | and the end, and if `revert-buffer-insert-file-contents-function' is | non-nil, it is called instead of rereading visited file contents. `---- -- Kevin Rodgers