From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Bozhidar Batsov <bozhidar@batsov.com>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] trunk r115287: * lisp/emacs-lisp/helpers.el (string-empty-p): New function.
Date: Fri, 29 Nov 2013 13:23:55 -0500 [thread overview]
Message-ID: <jwvbo13ax1d.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <E1VmRIu-00084e-Mh@vcs.savannah.gnu.org> (Bozhidar Batsov's message of "Fri, 29 Nov 2013 16:52:32 +0000")
> + (string= string ""))
I think `equal' is preferable since it avoids signaling an error if
STRING is not a string.
> +(defsubst string-blank-p (string)
> + "Check whether STRING is either empty or only whitespace."
> + (string-empty-p (string-trim string)))
Better use (string-match-p "\\`...\\'" string) to avoid allocating a new
string.
Stefan
next parent reply other threads:[~2013-11-29 18:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1VmRIu-00084e-Mh@vcs.savannah.gnu.org>
2013-11-29 18:23 ` Stefan Monnier [this message]
2013-11-29 21:29 ` [Emacs-diffs] trunk r115287: * lisp/emacs-lisp/helpers.el (string-empty-p): New function Bozhidar Batsov
2013-11-29 23:50 ` helpers.el [was: ... lisp/emacs-lisp/helpers.el...] Drew Adams
2013-11-30 7:41 ` Bozhidar Batsov
2013-11-30 8:07 ` Jambunathan K
2013-12-04 15:55 ` Ted Zlatanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvbo13ax1d.fsf-monnier+emacsdiffs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=bozhidar@batsov.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.