From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Shahid Newsgroups: gmane.emacs.bugs Subject: bug#31325: 27.0.50; PROPOSAL: introduce a new function to recenter without redisplaying the frame Date: Tue, 03 Jul 2018 16:38:32 +0000 Message-ID: <87k1qcxojb.fsf@gmail.com> References: <87po2gkxpi.fsf@gmail.com> <87sh57yrax.fsf@gmail.com> <83lgawmwup.fsf@gnu.org> <878t6wxbzr.fsf@gmail.com> <5B38994B.2010605@gmx.at> <87va9zxfhe.fsf@gmail.com> <83in5zkjsk.fsf@gnu.org> <87tvpiyjz6.fsf@gmail.com> <83fu12lwh2.fsf@gnu.org> <87sh52yiwf.fsf@gmail.com> <83d0w6ltm4.fsf@gnu.org> <87po06ye9q.fsf@gmail.com> <83woudk6gr.fsf@gnu.org> <87lgatxtip.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1530637715 2210 195.159.176.226 (3 Jul 2018 17:08:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 3 Jul 2018 17:08:35 +0000 (UTC) User-Agent: mu4e 1.1.0; emacs 27.0.50 Cc: 31325@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 03 19:08:30 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1faOmz-0000SW-He for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Jul 2018 19:08:29 +0200 Original-Received: from localhost ([::1]:41838 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1faOp6-0003J2-Se for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Jul 2018 13:10:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1faOKY-0002jz-Cy for bug-gnu-emacs@gnu.org; Tue, 03 Jul 2018 12:39:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1faOKU-0001NF-Dq for bug-gnu-emacs@gnu.org; Tue, 03 Jul 2018 12:39:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37746) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1faOKU-0001N7-88 for bug-gnu-emacs@gnu.org; Tue, 03 Jul 2018 12:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1faOKT-0003Xd-Uv for bug-gnu-emacs@gnu.org; Tue, 03 Jul 2018 12:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: John Shahid Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Jul 2018 16:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31325 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31325-submit@debbugs.gnu.org id=B31325.153063592913595 (code B ref 31325); Tue, 03 Jul 2018 16:39:01 +0000 Original-Received: (at 31325) by debbugs.gnu.org; 3 Jul 2018 16:38:49 +0000 Original-Received: from localhost ([127.0.0.1]:45643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1faOKF-0003XB-KP for submit@debbugs.gnu.org; Tue, 03 Jul 2018 12:38:47 -0400 Original-Received: from mail-qt0-f179.google.com ([209.85.216.179]:33277) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1faOKD-0003Ww-L4 for 31325@debbugs.gnu.org; Tue, 03 Jul 2018 12:38:46 -0400 Original-Received: by mail-qt0-f179.google.com with SMTP id l10-v6so2135539qtj.0 for <31325@debbugs.gnu.org>; Tue, 03 Jul 2018 09:38:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=dwQhrY1Gcm4Z0pgjK/AictQsJddch0MguSU1V5fO5UY=; b=FBV/g/eWnhKzaZ70BoTV9Ssp+0/407RQ1OocHyQjxXG2IsBPKkl2149ssjY4RoAumi 4yY/HjkPmqy724rHzSFO0TsEQg3ZZJ+j37modA57NHFSjILeNh4s9kQ5dGPZ1+e49LT4 Io82DE7F3/Tto6zMmqb5oJbE9EhAuCK1X6Ezl1y0u7s6wyN0ocz5tAY2E51xgSxAfPdI 6dGTu2CwmQupy5ydZnSGGHJnKNWUfKJS0fCIUPH1kqeva1jGnJjYno7Ri/g+2UOhQOuh mf9y39M7/7PjIwy5H2xckxOKFipJXwP6CIZdrwD5hy1BGzKzSS16sDRZOaU+f5PA9Or5 SCsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=dwQhrY1Gcm4Z0pgjK/AictQsJddch0MguSU1V5fO5UY=; b=Af8PAmVWIzyOviF2o7Q6vWCMzxn+o5rVdX/5c5Bg1q+OFMYfnMgan+vhfYGM94GMLz 0wXFPV1dzcIxRUEh/aAf8h418TM6JuM3Wr/sQcxHvQhA98+vUFiOutLD1K/z71dX8Fbf iYMqDAbrCCX6VJg2PxfuMfErJoYOQulpnf3cgByprNqoR8lq8KZFcVUShxpHXQepe0jB i9hfWi/Hu13xZ8ChAwsRhcruStTBE3rdkqYTuXhiJLyDJpfEfra5OxqKEBMkASoCMW/d 7+E3pliktymh82tNFbkzG+qfVG7GpQLc/I2kky4TDXWsu+vmRoosN4AnN2gVWu6SIJ6P XuwA== X-Gm-Message-State: APt69E0JmtyD5Dpsj4mc7VXMxQ5hcKXoJHdMs+FlOfQ4czDQqdQQf4jD IAErCP3dLDHAvs1sdb7gXGo= X-Google-Smtp-Source: AAOMgpfajPIBCsTpiwJXwXeGaQiyMYA/GA+30Y1iD+XHklZDEdZ+3nZvcU0iQsuKAxlknC95/x5MPQ== X-Received: by 2002:ac8:2f42:: with SMTP id k2-v6mr23005197qta.169.1530635919732; Tue, 03 Jul 2018 09:38:39 -0700 (PDT) Original-Received: from 9a50e8462956 ([142.154.219.2]) by smtp.gmail.com with ESMTPSA id h22-v6sm876281qkj.84.2018.07.03.09.38.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Jul 2018 09:38:38 -0700 (PDT) In-reply-to: <87lgatxtip.fsf@gmail.com> 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: 208.118.235.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:148158 Archived-At: --=-=-= Content-Type: text/plain John Shahid writes: > Eli Zaretskii writes: > >>> From: John Shahid >>> Cc: rudalics@gmx.at, 31325@debbugs.gnu.org, monnier@iro.umontreal.ca >>> Date: Sun, 01 Jul 2018 18:58:09 +0000 >>> >>> >From 3ac3d2d5f60593776563e27d4b406b2776de9b96 Mon Sep 17 00:00:00 2001 >>> From: John Shahid >>> Date: Sun, 1 Jul 2018 14:48:24 -0400 >>> Subject: [PATCH] Keep `recenter' behavior backward compatible when called >>> interactively >>> >>> * window.c (recenter): Change the interactive spec to always pass a >>> non-nil value to the REDISPLAY argument when called interactively. >>> * window.el (recenter-top-bottom): Make sure recenter's second >>> argument is non-nil everywhere. >>> * windows.texi (Textual Scrolling): Edit documentation of `recenter'. >> >> Bug number is missing. Also, we prefer to quite in documentation (as >> opposed to doc strings) 'like this', not `like this'. > > That is fixed in the attached patch. I rebased and attached a new patch since there were some changes to the manual on master. --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-Keep-interactive-uses-of-recenter-backward-compatibl.patch Content-Transfer-Encoding: quoted-printable >From 88c07293e82e2bcd9dbfc09a87e4d45f3e56676c Mon Sep 17 00:00:00 2001 From: John Shahid Date: Sun, 1 Jul 2018 14:48:24 -0400 Subject: [PATCH] Keep interactive uses of 'recenter' backward compatible (Bug#31325) * window.c (recenter): Change the interactive spec to always pass a non-nil value to the REDISPLAY argument when called interactively. * window.el (recenter-top-bottom): Make sure recenter's second argument is non-nil everywhere. * windows.texi (Textual Scrolling): Edit documentation of 'recenter'. --- doc/lispref/windows.texi | 3 ++- lisp/window.el | 2 +- src/window.c | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index ae6837b444..3eaa15a603 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -4156,7 +4156,8 @@ Textual Scrolling non-@code{nil}, this function may redraw the frame, according to the value of @code{recenter-redisplay}. Thus, omitting the second argument can be used to countermand the effect of -@code{recenter-redisplay} being non-@code{nil}. +@code{recenter-redisplay} being non-@code{nil}. Interactive calls +pass non-=E2=80=98nil=E2=80=99 for @var{redisplay}. =20 When @code{recenter} is called interactively, @var{count} is the raw prefix argument. Thus, typing @kbd{C-u} as the prefix sets the diff --git a/lisp/window.el b/lisp/window.el index 6d9d8bdcd2..d56bed63da 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -8767,7 +8767,7 @@ recenter-top-bottom With plain `C-u', move current line to window center." (interactive "P") (cond - (arg (recenter arg)) ; Always respect ARG. + (arg (recenter arg t)) ; Always respect ARG. (t (setq recenter-last-op (if (eq this-command last-command) diff --git a/src/window.c b/src/window.c index 20f6862e3b..047b741475 100644 --- a/src/window.c +++ b/src/window.c @@ -5896,7 +5896,7 @@ displayed_window_lines (struct window *w) } =20 =20 -DEFUN ("recenter", Frecenter, Srecenter, 0, 2, "P", +DEFUN ("recenter", Frecenter, Srecenter, 0, 2, "P\np", doc: /* Center point in selected window and maybe redisplay frame. With a numeric prefix argument ARG, recenter putting point on screen line = ARG relative to the selected window. If ARG is negative, it counts up from the @@ -5908,7 +5908,7 @@ non-nil, also erase the entire frame and redraw it (w= hen `auto-resize-tool-bars' is set to `grow-only', this resets the tool-bar's height to the minimum height needed); if `recenter-redisplay' has the special value `tty', then only tty frames -are redrawn. +are redrawn. Interactively, REDISPLAY is always non-nil. =20 Just C-u as prefix means put point in the center of the window and redisplay normally--don't erase and redraw the frame. */) --=20 2.18.0 --=-=-=--