From: Stefan Monnier Date: Tue, 1 Mar 2011 03:10:11 +0000 (-0800) Subject: * lisp/dired.el (dired-safe-switches-p): New function. (Bug#3230) X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~694 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=75da6eb97218018fcc0290529149cb1d2c1ceede;p=emacs.git * lisp/dired.el (dired-safe-switches-p): New function. (Bug#3230) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5b8a5be8280..c4154b9a56e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-03-01 Stefan Monnier + + * dired.el (dired-safe-switches-p): New function. + 2011-03-01 Glenn Morris * files.el (dir-locals-collect-variables): diff --git a/lisp/dired.el b/lisp/dired.el index 625ed48eff4..4b9bc19c8d9 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -249,6 +249,9 @@ Local to each dired buffer. May be a list, in which case the car is the directory name and the cdr is the list of files to mention. The directory name must be absolute, but need not be fully expanded.") +(defun dired-safe-switches-p (switches) + (string-match "\\`[- [:alnum:]]+\\'" switches)) + (defvar dired-actual-switches nil "The value of `dired-listing-switches' used to make this buffer's text.")