unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: flet is obsolete, but...
Date: Thu, 11 Oct 2012 10:10:24 +0200	[thread overview]
Message-ID: <87391lzaxb.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: 80lifdsad6.fsf@somewhere.org

"Sebastien Vauban"
<wxhgmqzgwmuf@spammotel.com> writes:

>> Use the NOCONFIRM argument of revert-buffer.
>
> I tried another way:

What's wrong with NOCONFIRM?

>   (defun my/revert-buffer ()
>     "Unconditionally revert current buffer."
>     (interactive)
>     (let ((revert-without-query t))
>       (revert-buffer)))
>
> but I don't understand why it does not work:
>
> --8<---------------cut here---------------start------------->8---
> Debugger entered--Lisp error: (wrong-type-argument listp t)
>   byte-code("\b\304\211\205\x1f\n@\305	\v\"\203

Because t is not a list.  The docs clearly state that
`revert-without-query' has to be a list of regular expressions.

,----[ C-h v revert-without-query RET ]
| revert-without-query is a variable defined in `files.el'.
| Its value is nil
| 
| Documentation:
| Specify which files should be reverted without query.
| The value is a list of regular expressions.
| If the file name matches one of these regular expressions,
| then `revert-buffer' reverts the file without querying
| if the file has changed on disk and you have not edited the buffer.
`----

Bye,
Tassilo




  reply	other threads:[~2012-10-11  8:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-10 12:39 flet is obsolete, but Sebastien Vauban
2012-10-10 13:17 ` Jambunathan K
2012-10-10 13:18 ` Jambunathan K
2012-10-10 14:31 ` Barry Margolin
2012-10-11 14:55   ` Sebastien Vauban
     [not found] ` <mailman.10697.1349875031.855.help-gnu-emacs@gnu.org>
2012-10-11  8:04   ` Sebastien Vauban
2012-10-11  8:10     ` Tassilo Horn [this message]
2012-10-11  8:17     ` Jambunathan K
2012-10-11 13:48     ` Drew Adams
2012-10-11 14:33       ` Ludwig, Mark
2012-10-11 15:18         ` `f5' for refreshing/reverting without confirmation [was: flet is obsolete, but...] Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87391lzaxb.fsf@thinkpad.tsdh.de \
    --to=tsdh@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).