unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Robert Pluim <rpluim@gmail.com>
Cc: Philipp Stephani <phst@google.com>,
	Emacs developers <emacs-devel@gnu.org>
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	[thread overview]
Message-ID: <CAArVCkTWqCjcdSSEq6vTBQJQ=Orra2-ATxHOv_N_UXM+OsMZ-A@mail.gmail.com> (raw)
In-Reply-To: <87h7a2qy73.fsf@gmail.com>

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).



  reply	other threads:[~2022-01-17 17:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <164219059635.16941.2631797019964844711@vcs2.savannah.gnu.org>
     [not found] ` <20220114200316.CB79BC0DA30@vcs2.savannah.gnu.org>
2022-01-17 13:38   ` master 64109fcae7 2/3: indent-for-tab-command: Deal with large point or modiff values Robert Pluim
2022-01-17 17:23     ` Philipp Stephani [this message]
2022-01-17 17:29       ` Robert Pluim
2022-01-17 19:55       ` Stefan Monnier
2022-01-17 21:35         ` Mattias Engdegård
2022-01-17 22:25           ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAArVCkTWqCjcdSSEq6vTBQJQ=Orra2-ATxHOv_N_UXM+OsMZ-A@mail.gmail.com' \
    --to=p.stephani2@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=phst@google.com \
    --cc=rpluim@gmail.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 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).