[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 64109fcae7 2/3: indent-for-tab-command: Deal with large point
From: |
Philipp Stephani |
Subject: |
Re: master 64109fcae7 2/3: indent-for-tab-command: Deal with large point or modiff values. |
Date: |
Mon, 17 Jan 2022 18:23:07 +0100 |
Am Mo., 17. Jan. 2022 um 15:27 Uhr schrieb Robert Pluim <rpluim@gmail.com>:
>
> >>>>> On Fri, 14 Jan 2022 15:03:16 -0500 (EST), Philipp Stephani
> >>>>> <p.stephani2@gmail.com> said:
>
> Philipp> branch: master
> Philipp> commit 64109fcae710a372bf7690e2da461ab71ca78dcd
> Philipp> Author: Philipp Stephani <phst@google.com>
> Philipp> Commit: Philipp Stephani <phst@google.com>
>
> Philipp> indent-for-tab-command: Deal with large point or modiff
> values.
>
> Philipp> * lisp/indent.el (indent-for-tab-command): Don't use 'eq' to
> compare
> Philipp> integers that aren't guaranteed to be fixnums.
> Philipp> ---
> Philipp> lisp/indent.el | 4 ++--
> Philipp> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Philipp> diff --git a/lisp/indent.el b/lisp/indent.el
> Philipp> index 8dc4c31f13..ad6fd899c5 100644
> Philipp> --- a/lisp/indent.el
> Philipp> +++ b/lisp/indent.el
> Philipp> @@ -182,8 +182,8 @@ prefix argument is ignored."
> Philipp> (cond
> Philipp> ;; If the text was already indented right, try
> completion.
> Philipp> ((and (eq tab-always-indent 'complete)
> Philipp> - (eq old-point (point))
> Philipp> - (eq old-tick (buffer-chars-modified-tick))
> Philipp> + (eql old-point (point))
> Philipp> + (eql old-tick (buffer-chars-modified-tick))
> Philipp> (or (null tab-first-completion)
> Philipp> (eq last-command this-command)
> Philipp> (and (equal tab-first-completion 'eol)
>
> You could use '=' here, no, just to emphasise the point that these are
> integers?
Yeah, they have identical semantics for integers. I tend to prefer eql
since its overall semantics are simpler (but the manual disagrees and
says that = should be preferred).