[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#3230: 23.0.93; Make dired-actual-switches safe local variable?
From: |
Leo |
Subject: |
bug#3230: 23.0.93; Make dired-actual-switches safe local variable? |
Date: |
Thu, 24 Feb 2011 14:51:16 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2.94 (Mac OS X 10.6.6) |
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