From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alex Newsgroups: gmane.emacs.bugs Subject: bug#34858: indent-relative called with prefix calls tab-to-tab-stop Date: Thu, 14 Mar 2019 12:57:08 -0600 Message-ID: <87k1h15lob.fsf@gmail.com> References: <871s39mpu6.fsf@gmail.com> <83wol11m5b.fsf@gnu.org> <87o96d5rrn.fsf@gmail.com> <83tvg51ghz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="4313"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: alex.branham@gmail.com, 34858@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 14 21:20:22 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h4Wpy-0000y9-AQ for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Mar 2019 21:20:22 +0100 Original-Received: from localhost ([127.0.0.1]:44455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4Wpx-0001bo-7k for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Mar 2019 16:20:21 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4Wm5-00069D-Dn for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2019 16:16:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h4Wbr-0003RA-11 for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2019 16:05:48 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58780) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h4Wbq-0003Qu-OH for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2019 16:05:46 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h4VYI-0006st-0z for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2019 14:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Mar 2019 18:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34858 X-GNU-PR-Package: emacs Original-Received: via spool by 34858-submit@debbugs.gnu.org id=B34858.155258984426405 (code B ref 34858); Thu, 14 Mar 2019 18:58:01 +0000 Original-Received: (at 34858) by debbugs.gnu.org; 14 Mar 2019 18:57:24 +0000 Original-Received: from localhost ([127.0.0.1]:44043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h4VXf-0006rp-Q3 for submit@debbugs.gnu.org; Thu, 14 Mar 2019 14:57:24 -0400 Original-Received: from mail-it1-f178.google.com ([209.85.166.178]:33403) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h4VXd-0006rO-SX for 34858@debbugs.gnu.org; Thu, 14 Mar 2019 14:57:22 -0400 Original-Received: by mail-it1-f178.google.com with SMTP id f186so8521396ita.0 for <34858@debbugs.gnu.org>; Thu, 14 Mar 2019 11:57:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=atDgT6TBnVWfgP35qKzgpshm/PCoeVdeO0iVkvGqfKc=; b=fsCS1j6ri9NKXdaabj3rv51gmIon1zIl1GzCZotEAAs7SyFYoT/dRMIkDKr7iYMi2V OHHivy10rdF9lQOUVa37ALB+2apEgElTRInzO0nDN+4ax+yZfNtLbnXt9M0uXpVsGC9E /Ijy9mxyhqxotANdKrJ/t7DObSuU6UY16KrrnbDcu81KIFnhf6aW+RtZViI2Y4syIgmg g94KsuywU9qCYAdRYUmHpf4rPhP5Hka3VusFLMijvhGyXRwWc6kWO+NSrZmak67eiuHy 3iWOxYPxjs35BAoOTh4S1EXwz8kAUF0NVWGO8Ng+E0QRHjZ2hduulIPpcue7iFV/+BwK pbDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=atDgT6TBnVWfgP35qKzgpshm/PCoeVdeO0iVkvGqfKc=; b=nnSzrIrAokUhCICvB72BDvM1EUekcLA//AmgMME1Sp7lzdDN3N5nGEB9zU0QOejcGU sWDrEpQ0XkCn2ryVNzbJ0ODpjsmZdymuYb2P/dbsCxIOLkwLNxs7tyLDBEInCY+KHkLO BBa3LG2pzlysxLLas7QPlylhXiicANmBCtQL5zn3IgtodECaZ5zNodMTYtPDUkgj17jS reCZG6j7vLbCjR+RZ7Uj6tFIVri5OwbpTh1/bUnsGgrvVtw21y7f49lN5RrmzL+1zPi8 iDWUZTaYoOsy/mTSxc9K+K62qZaQO8MuF8NUsEgcaWcCDTQdzq5AhT4l44NjMRFQtPw1 7hVw== X-Gm-Message-State: APjAAAULDK0jzHDpaPikDnlrIaMAR9MpaRNl7F3ZdNVHYDdrfqzgXaKu 6fLQUlCtStYsdMu+uy/P0oSF92NK X-Google-Smtp-Source: APXvYqwva4MzyNACP7Sq6+4vl8kelZ4FbAt9YP4crxw0zwg0Wp9InWLI6jUyowXyWH7avY+e0/if7g== X-Received: by 2002:a02:3e8b:: with SMTP id s133mr13159018jas.16.1552589835721; Thu, 14 Mar 2019 11:57:15 -0700 (PDT) Original-Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id y19sm1737741itb.2.2019.03.14.11.57.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Mar 2019 11:57:14 -0700 (PDT) In-Reply-To: <83tvg51ghz.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 14 Mar 2019 20:02:32 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:156354 Archived-At: Eli Zaretskii writes: >> From: Alex >> Cc: Alex Branham , 34858@debbugs.gnu.org >> Date: Thu, 14 Mar 2019 10:45:32 -0600 >> > >> > I think this is a documentation bug, as it doesn't describe the >> > special case of "no previous nonblank line". >> >> I believe that the case of "no previous nonblank line" could be >> considered as there being a single indent point at column 0, so if >> FIRST-ONLY is non-nil, then `tab-to-tab-stop' shouldn't be called. How >> about the following patch instead? > > I don't understand what you are saying here. The doc string says "no > indent point _beyond_" the column where point starts, so assuming a > single indent point at column zero doesn't change anything. Sorry, I wasn't clear. I meant that the special case here could be considered (trivially) equivalent to the case where the previous non-blank line has a single indent point at column zero, and therefore should be treated equivalently when FIRST-ONLY is non-nil (`tab-to-tab-stop` should not be called if on or past the first indent point, i.e., column 0). The usage of `beyond' does not change the behaviour when the starting column is on the first indent point, which outside of this special case is doing nothing. Specifically, the `indent' branch of the cond is normally executed when FIRST-ONLY is non-nil because `indent' is set within the `re-search-backward' conditional to be equal to the starting column; however, in this special case, `re-search-backward' returns nil and so `indent' remains nil. My patch covers this case by also checking for FIRST-ONLY in the cond.