[parent not found: <20210423025715.E84AF20D12@vcs0.savannah.gnu.org>]
[parent not found: <20210423025718.7AA4220D12@vcs0.savannah.gnu.org>]
* Re: [elpa] externals/pyim 9f017ac 18/36: New file: pyim-entered.el
[not found] ` <20210423025718.7AA4220D12@vcs0.savannah.gnu.org>
@ 2021-04-23 3:19 ` Stefan Monnier
2021-04-23 4:46 ` tumashu
2021-04-23 8:51 ` Andreas Schwab
0 siblings, 2 replies; 6+ messages in thread
From: Stefan Monnier @ 2021-04-23 3:19 UTC (permalink / raw)
To: emacs-devel; +Cc: Feng Shu
> + (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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re:Re: [elpa] externals/pyim 9f017ac 18/36: New file: pyim-entered.el
2021-04-23 3:19 ` [elpa] externals/pyim 9f017ac 18/36: New file: pyim-entered.el Stefan Monnier
@ 2021-04-23 4:46 ` tumashu
2021-04-23 8:51 ` Andreas Schwab
1 sibling, 0 replies; 6+ messages in thread
From: tumashu @ 2021-04-23 4:46 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 471 bytes --]
Fixed, thanks!
At 2021-04-23 11:19:49, "Stefan Monnier" <monnier@iro.umontreal.ca> wrote:
>> + (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
[-- Attachment #2: Type: text/html, Size: 872 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [elpa] externals/pyim 9f017ac 18/36: New file: pyim-entered.el
2021-04-23 3:19 ` [elpa] externals/pyim 9f017ac 18/36: New file: pyim-entered.el Stefan Monnier
2021-04-23 4:46 ` tumashu
@ 2021-04-23 8:51 ` Andreas Schwab
1 sibling, 0 replies; 6+ messages in thread
From: Andreas Schwab @ 2021-04-23 8:51 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Feng Shu, emacs-devel
On Apr 22 2021, Stefan Monnier wrote:
>> + (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.
Also, (equal 1 (point)) should be written as (bobp).
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-04-23 8:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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 ` [elpa] externals/pyim 9f017ac 18/36: New file: pyim-entered.el Stefan Monnier
2021-04-23 4:46 ` tumashu
2021-04-23 8:51 ` Andreas Schwab
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).