[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [elpa] externals/pyim 9f017ac 18/36: New file: pyim-entered.el
From: |
Andreas Schwab |
Subject: |
Re: [elpa] externals/pyim 9f017ac 18/36: New file: pyim-entered.el |
Date: |
Fri, 23 Apr 2021 10:51:37 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
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."