unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Bozhidar Batsov <bozhidar@batsov.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel <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 23:29:57 +0200	[thread overview]
Message-ID: <CAM9Zgm2Q6D2Bb-K19WOQCPBHWok0OgUgN4Sxrop5hYBcRJkAwQ@mail.gmail.com> (raw)
In-Reply-To: <jwvbo13ax1d.fsf-monnier+emacsdiffs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 665 bytes --]

On 29 November 2013 20:23, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> > +  (string= string ""))
>
> I think `equal' is preferable since it avoids signaling an error if
> STRING is not a string.
>

Not sure about that. After all, this function is meant to be used with a
STRING argument. On the other hand using `equal' will make it play better
with nil.


>
> > +(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.
>

You're right. I'll change this.


>
>
>         Stefan
>

[-- Attachment #2: Type: text/html, Size: 1435 bytes --]

  reply	other threads:[~2013-11-29 21:29 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 ` [Emacs-diffs] trunk r115287: * lisp/emacs-lisp/helpers.el (string-empty-p): New function Stefan Monnier
2013-11-29 21:29   ` Bozhidar Batsov [this message]
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAM9Zgm2Q6D2Bb-K19WOQCPBHWok0OgUgN4Sxrop5hYBcRJkAwQ@mail.gmail.com \
    --to=bozhidar@batsov.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).