]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/dired.el (dired-safe-switches-p): New function. (Bug#3230)
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 1 Mar 2011 03:10:11 +0000 (19:10 -0800)
committerGlenn Morris <rgm@gnu.org>
Tue, 1 Mar 2011 03:10:11 +0000 (19:10 -0800)
lisp/ChangeLog
lisp/dired.el

index 5b8a5be828077ba28bc44fd10f270603eeae6624..c4154b9a56e7c5479f94b378a3c9ad64d71b2484 100644 (file)
@@ -1,3 +1,7 @@
+2011-03-01  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * dired.el (dired-safe-switches-p): New function.
+
 2011-03-01  Glenn Morris  <rgm@gnu.org>
 
        * files.el (dir-locals-collect-variables):
index 625ed48eff411d3e186944c192f5d9d40259957b..4b9bc19c8d9affb86f3a4ddeb609d267338ac579 100644 (file)
@@ -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.")