[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
no empty (zero) string predicate in Elisp
From: |
Emanuel Berg |
Subject: |
no empty (zero) string predicate in Elisp |
Date: |
Sat, 25 Apr 2015 05:44:06 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
In one of my w3m extensions [1] I have
(defun empty-string-p (str)
(string= str "") )
which obviously has nothing to do with w3m. Well, it's
been known to happen. I can live with having it there.
However, the next time I want to use it in some other
file the byte-compiler tells me
In end of data: wrap-search.el:98:1:Warning: the
function `empty-string-p' is not known to
be defined.
OK, I get that away with
(require 'w3m-unisearch) ; get empty-string-p
But now I have a mention of w3m, in a file that has
nothing to do with w3m, to get empty-string-p, which
has nothing to do with w3m!
Of course, I can do yet a third file -
my-string-predicate.el - and require that from both
files. But I feel I shouldn't have to. Such basic
things shouldn't have to be solved on a Joe Hacker
basis. It should be included. And not in ELPA,
in Emacs!
I'll report this as a bug unless someone presents
really convincing stuff why it shouldn't be included.
Or, if there is something equivalent - equivalent in
the syntactic sense, I mean - I am aware of
(= (length str) 0)
and
(equal "" str)
but it should be a binary operator.
[1] http://user.it.uu.se/~embe8573/conf/emacs-init/w3m/w3m-unisearch.el
--
underground experts united
http://user.it.uu.se/~embe8573