Subject: Re: bug#3230: 23.0.93; Make dired-actual-switches safe local variable?

From: Leo <[email-masked]>
Date: Thu, 24 Feb 2011 14:51:16 +0800

On 2011-02-24 12:46 +0800, Leo wrote:
> (defun dired-actual-switches-p (switches)
>   (assert (stringp switches))
>   (mapc
>    (lambda (switch)
>      (assert (eq (aref switch 0) ?-)))
>    (split-string switches nil t)))

Sorry, it should not err. I originally named the function
dired-check-switches, then changed it to be a predicate in the last
minute.

(defun dired-actual-switches-p (switches)
  (and (stringp switches)
       (catch 'exit
         (mapc (lambda (switch)
                 (unless (eq (aref switch 0) ?-)
                   (throw 'exit nil)))
               (split-string switches nil t))
         t)))

Leo