On Thu, Apr 23, 2026 at 07:53:36PM +0800, Qian Yun wrote:
> + writable? f ==
> + n := f::String
> + if n = "" then
> + n := "."
> + r1 : Integer := writeablep(n)$Lisp
> + r1 > 0 => true
> + n := file_directory(n)$Lisp
> + r1 := writeablep(n)$Lisp
> + r1 > 0
> -(defun |myWritable?| (s)
> - (if (not (stringp s)) (|error| "``myWritable?'' requires a string arg."))
> - (if (string= s "") (setq s "."))
> - (if (not (|fnameExists?| s)) (setq s (|file_directory| s)))
> - (if (string= s "") (setq s "."))
> - (if (> (|writeablep| s) 0) 't nil) )
>
> First, in "writable?", during the translation,
> 'if n = "" then n := "."' is lost after the 'file_directory' call.
>
> This causes 'writable?("non-exist-file")$FNAME' to return false
> instead of true.
Yes, we probably should add "." here too. Or change 'writeabolep'
to do this.
>
> +MAKEPROP('coerce, "/TRANSFORM", ["&", "&", "*"])
> +MAKEPROP('comp, "/TRANSFORM", ["&", "*", "*", "&"])
> +MAKEPROP('compIf, "/TRANSFORM", '["&", "*", "*", "&"])
> +MAKEPROP('compFormWithModemap, "/TRANSFORM", ["&", "*", "*", "&", "*"])
>
> Second, the quote in 'compIf' line is unintentional?
No, there should be no quote.
--
Waldek Hebisch