all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Cc: Feng Shu <tumashu@163.com>
Subject: Re: [elpa] externals/pyim 9f017ac 18/36: New file: pyim-entered.el
Date: Thu, 22 Apr 2021 23:19:49 -0400	[thread overview]
Message-ID: <jwvk0otbsev.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20210423025718.7AA4220D12@vcs0.savannah.gnu.org> (ELPA Syncer's message of "Thu, 22 Apr 2021 22:57:18 -0400 (EDT)")

> +  (pyim-with-entered-buffer
> +    (cond
> +     ((equal 1 (point))
> +      (buffer-string))
> +     ((eq type 'point-before)
> +      (buffer-substring-no-properties 1 (point)))

I recommend you use (point-min) rather than hardcoding 1.
It's a good practice in general, and as a bonus it leads to marginally
better bytecode.


        Stefan




  parent reply	other threads:[~2021-04-23  3:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210423025712.4844.13627@vcs0.savannah.gnu.org>
     [not found] ` <20210423025715.73EAE20D12@vcs0.savannah.gnu.org>
2021-04-23  3:10   ` [elpa] externals/pyim bf3626c 05/36: * pyim-common.el (pyim-flatten-list): Move from pyim.el Stefan Monnier
2021-04-23  4:44     ` tumashu
     [not found] ` <20210423025715.E84AF20D12@vcs0.savannah.gnu.org>
2021-04-23  3:14   ` [elpa] externals/pyim 09fd273 07/36: Sort pyim-common.el Stefan Monnier
     [not found] ` <20210423025718.7AA4220D12@vcs0.savannah.gnu.org>
2021-04-23  3:19   ` Stefan Monnier [this message]
2021-04-23  4:46     ` Re:Re: [elpa] externals/pyim 9f017ac 18/36: New file: pyim-entered.el tumashu
2021-04-23  8:51     ` Andreas Schwab

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=jwvk0otbsev.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=tumashu@163.com \
    /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.