From 75da6eb97218018fcc0290529149cb1d2c1ceede Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 28 Feb 2011 19:10:11 -0800 Subject: [PATCH] * lisp/dired.el (dired-safe-switches-p): New function. (Bug#3230) --- lisp/ChangeLog | 4 ++++ lisp/dired.el | 3 +++ 2 files changed, 7 insertions(+) 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.") -- 2.11.4.GIT