emacs-devel
[Top][All Lists]
Advanced

[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: Stefan Monnier
Subject: Re: [elpa] externals/pyim 9f017ac 18/36: New file: pyim-entered.el
Date: Thu, 22 Apr 2021 23:19:49 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]