[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[h-e-w] Re: customizing dired garbage files regex

From: John Paul Wallington
Subject: [h-e-w] Re: customizing dired garbage files regex
Date: 11 Sep 2002 11:51:21 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Victor Kirk <address@hidden> wrote:

> > How do I add my own ones to this list?  I can't seem to customize this
> > behaviour short of editing dired.el, of course.
> You could use a set statement to change this variable, e.g.
> (set 'dired-garbage-files-regexp 
>        (concat "\\.old$\\|" dired-garbage-files-regexp))
> This will match *.old in addition to the existing regexps.

`dired-garbage-files-regexp' is defined in the dired library;
typically, the variable is void until dired is loaded.

So within your .emacs file be careful to either (require 'dired)
before using `dired-garbage-files-regexp', or to defer using it until
the dired library is loaded and it is defined by putting your code on
`dired-load-hook' like so:

(add-hook 'dired-load-hook
          (lambda ()
            (setq dired-garbage-files-regexp 
                  (concat "\\.old$\\|" dired-garbage-files-regexp))))

John Paul Wallington

reply via email to

[Prev in Thread] Current Thread [Next in Thread]