emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: proposal to make null string handling more emacs-y


From: Steve Yegge
Subject: Re: proposal to make null string handling more emacs-y
Date: Thu, 26 Apr 2012 14:20:45 -0700

If the general change is too risky, I think there are still a few functions that
would benefit from being able to accept nils on a case-by-case basis.
Examples:

looking-at, string-match, search-forward-*
string-to-list, string-to-vector, (maybe) string-to-number
auto-save-file-name-p, backup-file-name-p
directory-file-name, expand-file-name, file-name-as-directory and their ilk (all of which handle "" gracefully)
rename-file, copy-file, delete-file ("no such file/dir" being more informative than "wrong type argument" here)
write-file (prompts on empty string; might as well prompt on nil)

There's a lot of code out there that's forced to do type assertions on string args
that could be simplified if these common functions could accept nils.

-steve

reply via email to

[Prev in Thread] Current Thread [Next in Thread]