From unknown Sat Aug 16 12:45:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25379: 26.0.50; Minor: Call looking-back as advertised Resent-From: Rolf Ade Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Jan 2017 18:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 25379 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 25379@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.148372746619445 (code B ref -1); Fri, 06 Jan 2017 18:32:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 Jan 2017 18:31:06 +0000 Received: from localhost ([127.0.0.1]:45378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPZIA-00053Z-Hs for submit@debbugs.gnu.org; Fri, 06 Jan 2017 13:31:06 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPZI8-000534-Sg for submit@debbugs.gnu.org; Fri, 06 Jan 2017 13:31:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPZI2-00066U-DJ for submit@debbugs.gnu.org; Fri, 06 Jan 2017 13:30:59 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:45431) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cPZI2-00066Q-9t for submit@debbugs.gnu.org; Fri, 06 Jan 2017 13:30:58 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPZI0-0005F1-QU for bug-gnu-emacs@gnu.org; Fri, 06 Jan 2017 13:30:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPZHw-00064F-LY for bug-gnu-emacs@gnu.org; Fri, 06 Jan 2017 13:30:56 -0500 Received: from mxout3.interscholz.de ([85.236.196.238]:39120) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cPZHw-00061w-Au for bug-gnu-emacs@gnu.org; Fri, 06 Jan 2017 13:30:52 -0500 Received: from localhost (mxout3 [127.0.0.1]) by mxout3.interscholz.de (Postfix) with ESMTP id 14F5A2117E for ; Fri, 6 Jan 2017 19:30:42 +0100 (CET) X-Virus-Scanned: interscholz amavisd-new at mxout3.interscholz.de Received: from server.web01.interscholz.net (server.web01.interscholz.net [85.236.196.138]) by mxout3.interscholz.de (Postfix) with ESMTP id 6AC0B209C7 for ; Fri, 6 Jan 2017 19:30:36 +0100 (CET) Received: from linux-qg7d (p4FFBEC48.dip0.t-ipconnect.de [79.251.236.72]) by server.web01.interscholz.net (Postfix) with ESMTPSA id 3493CF0001 for ; Fri, 6 Jan 2017 19:30:36 +0100 (CET) From: Rolf Ade Date: Fri, 06 Jan 2017 19:30:35 +0100 Message-ID: <87y3yooxbo.fsf@pointsman.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Since emacs 25.1 C-h f looking-back RET shows: looking-back is a compiled Lisp function in =E2=80=98subr.el=E2=80=99. (looking-back REGEXP LIMIT &optional GREEDY) ... This is because of (declare (advertised-calling-convention (regexp limit &optional greedy) "25.1")) at the start of the looking-back implementation. It still can be called with only one argument (in this cases LIMIT will default to nil) and there are still a few such calls in the emacs core lisp code. This doesn't do any harm other than unnecessary "[...]Warning: looking-back called with 1 argument, but requires 2-3" noise in the compiling output while byte-compiling that files. The patch below silence that (simply by explicitly adding nil as second argument). This handles all such calls, that an el-search-load-path with the pattern `(looking-back ,_) found (see https://elpa.gnu.org/packages/el-search.html) with an appropriate load-path. That means, if that works as promoted: this patch handles all such cases curently still in the core. Commit message: * lisp/emulation/viper-ex.el (ex-cmd-read-exit): * lisp/org/org.el (org-read-date-minibuffer-local-map): * lisp/progmodes/hideshow.el (hs-hide-block-at-point): * lisp/progmodes/sql.el (sql-end-of-statement): Call looking-back as advertised. Copyright-paperwork-exempt: yes diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el index edc71ea..3fdeadb 100644 --- a/lisp/emulation/viper-ex.el +++ b/lisp/emulation/viper-ex.el @@ -548,9 +548,9 @@ ex-cmd-read-exit (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) (set-buffer viper-ex-work-buf) (goto-char (point-max))) - (cond ((looking-back quit-regex1) (exit-minibuffer)) - ((looking-back stay-regex) (insert " ")) - ((looking-back quit-regex2) (exit-minibuffer)) + (cond ((looking-back quit-regex1 nil) (exit-minibuffer)) + ((looking-back stay-regex nil) (insert " ")) + ((looking-back quit-regex2 nil) (exit-minibuffer)) (t (insert " "))))) =20 (declare-function viper-tmp-insert-at-eob "viper-cmd" (msg)) diff --git a/lisp/org/org.el b/lisp/org/org.el index 02a7a0c..2659a4d 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -16249,7 +16249,7 @@ org-read-date-minibuffer-local-map (org-defkey map (kbd ".") (lambda () (interactive) ;; Are we at the beginning of the prompt? - (if (looking-back "^[^:]+: ") + (if (looking-back "^[^:]+: " nil) (org-eval-in-calendar '(calendar-goto-today)) (insert ".")))) (org-defkey map (kbd "C-.") diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 0e4e670..5328526 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -582,7 +582,7 @@ hs-hide-block-at-point (setq p (line-end-position))) ;; `q' is the point at the end of the block (hs-forward-sexp mdata 1) - (setq q (if (looking-back hs-block-end-regexp) + (setq q (if (looking-back hs-block-end-regexp nil) (match-beginning 0) (point))) (when (and (< p q) (> (count-lines p q) 1)) diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index d6c9516..06ef4df 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -2790,7 +2790,7 @@ sql-end-of-statement ;; Iterate until we've moved the desired number of stmt ends (while (not (=3D (cl-signum arg) 0)) ;; if we're looking at the terminator, jump by 2 - (if (or (and (> 0 arg) (looking-back term)) + (if (or (and (> 0 arg) (looking-back term nil)) (and (< 0 arg) (looking-at term))) (setq n 2) (setq n 1)) In GNU Emacs 26.0.50.5 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) of 2017-01-06 built on linux-qg7d Repository revision: 8f0376309ee37e4f1da21d78971c4df2df5fd7b6 Windowing system distributor 'The X.Org Foundation', version 11.0.11203000 System Description: openSUSE 12.2 (x86_64) From unknown Sat Aug 16 12:45:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25379: 26.0.50; Minor: Call looking-back as advertised Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Jan 2017 18:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25379 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Rolf Ade Cc: 25379@debbugs.gnu.org Received: via spool by 25379-submit@debbugs.gnu.org id=B25379.148372892428220 (code B ref 25379); Fri, 06 Jan 2017 18:56:02 +0000 Received: (at 25379) by debbugs.gnu.org; 6 Jan 2017 18:55:24 +0000 Received: from localhost ([127.0.0.1]:45392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPZff-0007L5-1q for submit@debbugs.gnu.org; Fri, 06 Jan 2017 13:55:23 -0500 Received: from eggs.gnu.org ([208.118.235.92]:42965) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPZfd-0007Kr-70 for 25379@debbugs.gnu.org; Fri, 06 Jan 2017 13:55:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPZfX-0000FM-7f for 25379@debbugs.gnu.org; Fri, 06 Jan 2017 13:55:15 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD, UNRESOLVED_TEMPLATE autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34873) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPZfT-0000EN-Uk; Fri, 06 Jan 2017 13:55:11 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1cPZfT-0007rW-Hh; Fri, 06 Jan 2017 13:55:11 -0500 From: Glenn Morris References: <87y3yooxbo.fsf@pointsman.de> X-Spook: LABLINK Drill Tornado Consular Radiation 2600 Magazine X-Ran: %OMz1uFfmovJstox!RtX!B-<1f@xR5C\`AsRRfY!.,\Ctz,+U85+E74gDOn!)="7d>f!y] X-Hue: magenta X-Attribution: GM Date: Fri, 06 Jan 2017 13:55:11 -0500 In-Reply-To: <87y3yooxbo.fsf@pointsman.de> (Rolf Ade's message of "Fri, 06 Jan 2017 19:30:35 +0100") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -7.5 (-------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.5 (-------) But it's better to figure out a real limit, and the warning from having none specified reminds us of that, so IMO it's better to leave as-is till someone does that (or verifies that point-min is the best that can be done). From unknown Sat Aug 16 12:45:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25379: 26.0.50; Minor: Call looking-back as advertised Resent-From: Rolf Ade Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Jan 2017 21:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25379 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: 25379@debbugs.gnu.org Received: via spool by 25379-submit@debbugs.gnu.org id=B25379.148373881125139 (code B ref 25379); Fri, 06 Jan 2017 21:41:01 +0000 Received: (at 25379) by debbugs.gnu.org; 6 Jan 2017 21:40:11 +0000 Received: from localhost ([127.0.0.1]:45442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPcF9-0006XP-LJ for submit@debbugs.gnu.org; Fri, 06 Jan 2017 16:40:11 -0500 Received: from mxout3.interscholz.de ([85.236.196.238]:38301) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPcF7-0006XB-KT for 25379@debbugs.gnu.org; Fri, 06 Jan 2017 16:40:10 -0500 Received: from localhost (mxout3 [127.0.0.1]) by mxout3.interscholz.de (Postfix) with ESMTP id 4E1FA22BF8; Fri, 6 Jan 2017 22:40:03 +0100 (CET) X-Virus-Scanned: interscholz amavisd-new at mxout3.interscholz.de Received: from server.web01.interscholz.net (server.web01.interscholz.net [85.236.196.138]) by mxout3.interscholz.de (Postfix) with ESMTP id AE6132062E; Fri, 6 Jan 2017 22:40:00 +0100 (CET) Received: from linux-qg7d (p4FFBEC48.dip0.t-ipconnect.de [79.251.236.72]) by server.web01.interscholz.net (Postfix) with ESMTPSA id 15D4AF0001; Fri, 6 Jan 2017 22:39:58 +0100 (CET) From: Rolf Ade References: <87y3yooxbo.fsf@pointsman.de> Date: Fri, 06 Jan 2017 22:39:57 +0100 In-Reply-To: (Glenn Morris's message of "Fri, 06 Jan 2017 13:55:11 -0500") Message-ID: <87o9zj3m1e.fsf@pointsman.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Glenn Morris writes: > But it's better to figure out a real limit, and the warning from > having none specified reminds us of that, so IMO it's better to leave > as-is till someone does that (or verifies that point-min is the best > that can be done). Ah ..., OK, then. So, you say, all that lisp compiling warnings during a fresh emacs build are such 'reminders'? And this is "wishlist" instead of "wontfix" because you would like to get that fixed, but in a better way then by my 'just pacify byte-compiling' patch? From unknown Sat Aug 16 12:45:05 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Rolf Ade Subject: bug#25379: closed (Re: bug#25379: 26.0.50; Minor: Call looking-back as advertised) Message-ID: References: <87ftmnurng.fsf@pointsman.de> <87y3yooxbo.fsf@pointsman.de> X-Gnu-PR-Message: they-closed 25379 X-Gnu-PR-Package: emacs Reply-To: 25379@debbugs.gnu.org Date: Tue, 30 Jul 2019 21:42:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1564522922-17912-1" This is a multi-part message in MIME format... ------------=_1564522922-17912-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #25379: 26.0.50; Minor: Call looking-back as advertised which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 25379@debbugs.gnu.org. --=20 25379: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D25379 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1564522922-17912-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 25379-done) by debbugs.gnu.org; 30 Jul 2019 21:41:36 +0000 Received: from localhost ([127.0.0.1]:51316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsZsG-0004dn-Dc for submit@debbugs.gnu.org; Tue, 30 Jul 2019 17:41:36 -0400 Received: from mxout5.interscholz.de ([85.236.196.72]:52366) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsZsD-0004dY-8J for 25379-done@debbugs.gnu.org; Tue, 30 Jul 2019 17:41:34 -0400 Received: from localhost (mxout5 [127.0.0.1]) by mxout5.interscholz.de (Postfix) with ESMTP id 18680268A4 for <25379-done@debbugs.gnu.org>; Tue, 30 Jul 2019 23:41:19 +0200 (CEST) X-Virus-Scanned: interscholz amavisd-new at mxout5.interscholz.de Received: from server.web01.interscholz.net (server.web01.interscholz.net [85.236.196.138]) by mxout5.interscholz.de (Postfix) with ESMTP id 4CBB620BF5 for <25379-done@debbugs.gnu.org>; Tue, 30 Jul 2019 23:41:16 +0200 (CEST) Received: from pointsman2 (p5B317A9C.dip0.t-ipconnect.de [91.49.122.156]) by server.web01.interscholz.net (Postfix) with ESMTPSA id D2DC7340371; Tue, 30 Jul 2019 23:41:22 +0200 (CEST) From: Rolf Ade To: 25379-done@debbugs.gnu.org Subject: Re: bug#25379: 26.0.50; Minor: Call looking-back as advertised References: <87y3yooxbo.fsf@pointsman.de> Date: Tue, 30 Jul 2019 23:41:23 +0200 In-Reply-To: <87y3yooxbo.fsf@pointsman.de> (Rolf Ade's message of "Fri, 06 Jan 2017 19:30:35 +0100") Message-ID: <87ftmnurng.fsf@pointsman.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25379-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Rolf Ade writes: > Since emacs 25.1 > > C-h f looking-back RET > > shows: > > looking-back is a compiled Lisp function in =E2=80=98subr.el=E2=80=99. > > (looking-back REGEXP LIMIT &optional GREEDY) > ... > > This is because of > > (declare > (advertised-calling-convention (regexp limit &optional greedy) "25.1")) > > at the start of the looking-back implementation. > > It still can be called with only one argument (in this cases LIMIT will > default to nil) and there are still a few such calls in the emacs core > lisp code. > > This doesn't do any harm other than unnecessary > > "[...]Warning: looking-back called with 1 argument, but requires 2-3" > > noise in the compiling output while byte-compiling that files. > > The patch below silence that (simply by explicitly adding nil as second > argument). This handles all such calls, that an el-search-load-path with > the pattern `(looking-back ,_) found (see > https://elpa.gnu.org/packages/el-search.html) with an appropriate > load-path. That means, if that works as promoted: this patch handles all > such cases curently still in the core. > > Commit message: > > * lisp/emulation/viper-ex.el (ex-cmd-read-exit): > * lisp/org/org.el (org-read-date-minibuffer-local-map): > * lisp/progmodes/hideshow.el (hs-hide-block-at-point): > * lisp/progmodes/sql.el (sql-end-of-statement): Call looking-back as > advertised. > > Copyright-paperwork-exempt: yes > > > diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el > index edc71ea..3fdeadb 100644 > --- a/lisp/emulation/viper-ex.el > +++ b/lisp/emulation/viper-ex.el > @@ -548,9 +548,9 @@ ex-cmd-read-exit > (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) > (set-buffer viper-ex-work-buf) > (goto-char (point-max))) > - (cond ((looking-back quit-regex1) (exit-minibuffer)) > - ((looking-back stay-regex) (insert " ")) > - ((looking-back quit-regex2) (exit-minibuffer)) > + (cond ((looking-back quit-regex1 nil) (exit-minibuffer)) > + ((looking-back stay-regex nil) (insert " ")) > + ((looking-back quit-regex2 nil) (exit-minibuffer)) > (t (insert " "))))) >=20=20 > (declare-function viper-tmp-insert-at-eob "viper-cmd" (msg)) > diff --git a/lisp/org/org.el b/lisp/org/org.el > index 02a7a0c..2659a4d 100644 > --- a/lisp/org/org.el > +++ b/lisp/org/org.el > @@ -16249,7 +16249,7 @@ org-read-date-minibuffer-local-map > (org-defkey map (kbd ".") > (lambda () (interactive) > ;; Are we at the beginning of the prompt? > - (if (looking-back "^[^:]+: ") > + (if (looking-back "^[^:]+: " nil) > (org-eval-in-calendar '(calendar-goto-today)) > (insert ".")))) > (org-defkey map (kbd "C-.") > diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el > index 0e4e670..5328526 100644 > --- a/lisp/progmodes/hideshow.el > +++ b/lisp/progmodes/hideshow.el > @@ -582,7 +582,7 @@ hs-hide-block-at-point > (setq p (line-end-position))) > ;; `q' is the point at the end of the block > (hs-forward-sexp mdata 1) > - (setq q (if (looking-back hs-block-end-regexp) > + (setq q (if (looking-back hs-block-end-regexp nil) > (match-beginning 0) > (point))) > (when (and (< p q) (> (count-lines p q) 1)) > diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el > index d6c9516..06ef4df 100644 > --- a/lisp/progmodes/sql.el > +++ b/lisp/progmodes/sql.el > @@ -2790,7 +2790,7 @@ sql-end-of-statement > ;; Iterate until we've moved the desired number of stmt ends > (while (not (=3D (cl-signum arg) 0)) > ;; if we're looking at the terminator, jump by 2 > - (if (or (and (> 0 arg) (looking-back term)) > + (if (or (and (> 0 arg) (looking-back term nil)) > (and (< 0 arg) (looking-at term))) > (setq n 2) > (setq n 1)) > > > > In GNU Emacs 26.0.50.5 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) > of 2017-01-06 built on linux-qg7d > Repository revision: 8f0376309ee37e4f1da21d78971c4df2df5fd7b6 > Windowing system distributor 'The X.Org Foundation', version 11.0.11203000 > System Description: openSUSE 12.2 (x86_64) All the in this bug mentioned looking-at are in the meantimenow called with the advertised two args; no warning message regarding to this created anymore. This was done. (By others, mostly in the way I proposed in my patch.) ------------=_1564522922-17912-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 6 Jan 2017 18:31:06 +0000 Received: from localhost ([127.0.0.1]:45378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPZIA-00053Z-Hs for submit@debbugs.gnu.org; Fri, 06 Jan 2017 13:31:06 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPZI8-000534-Sg for submit@debbugs.gnu.org; Fri, 06 Jan 2017 13:31:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPZI2-00066U-DJ for submit@debbugs.gnu.org; Fri, 06 Jan 2017 13:30:59 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:45431) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cPZI2-00066Q-9t for submit@debbugs.gnu.org; Fri, 06 Jan 2017 13:30:58 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPZI0-0005F1-QU for bug-gnu-emacs@gnu.org; Fri, 06 Jan 2017 13:30:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPZHw-00064F-LY for bug-gnu-emacs@gnu.org; Fri, 06 Jan 2017 13:30:56 -0500 Received: from mxout3.interscholz.de ([85.236.196.238]:39120) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cPZHw-00061w-Au for bug-gnu-emacs@gnu.org; Fri, 06 Jan 2017 13:30:52 -0500 Received: from localhost (mxout3 [127.0.0.1]) by mxout3.interscholz.de (Postfix) with ESMTP id 14F5A2117E for ; Fri, 6 Jan 2017 19:30:42 +0100 (CET) X-Virus-Scanned: interscholz amavisd-new at mxout3.interscholz.de Received: from server.web01.interscholz.net (server.web01.interscholz.net [85.236.196.138]) by mxout3.interscholz.de (Postfix) with ESMTP id 6AC0B209C7 for ; Fri, 6 Jan 2017 19:30:36 +0100 (CET) Received: from linux-qg7d (p4FFBEC48.dip0.t-ipconnect.de [79.251.236.72]) by server.web01.interscholz.net (Postfix) with ESMTPSA id 3493CF0001 for ; Fri, 6 Jan 2017 19:30:36 +0100 (CET) From: Rolf Ade To: bug-gnu-emacs@gnu.org Subject: 26.0.50; Minor: Call looking-back as advertised Date: Fri, 06 Jan 2017 19:30:35 +0100 Message-ID: <87y3yooxbo.fsf@pointsman.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Since emacs 25.1 C-h f looking-back RET shows: looking-back is a compiled Lisp function in =E2=80=98subr.el=E2=80=99. (looking-back REGEXP LIMIT &optional GREEDY) ... This is because of (declare (advertised-calling-convention (regexp limit &optional greedy) "25.1")) at the start of the looking-back implementation. It still can be called with only one argument (in this cases LIMIT will default to nil) and there are still a few such calls in the emacs core lisp code. This doesn't do any harm other than unnecessary "[...]Warning: looking-back called with 1 argument, but requires 2-3" noise in the compiling output while byte-compiling that files. The patch below silence that (simply by explicitly adding nil as second argument). This handles all such calls, that an el-search-load-path with the pattern `(looking-back ,_) found (see https://elpa.gnu.org/packages/el-search.html) with an appropriate load-path. That means, if that works as promoted: this patch handles all such cases curently still in the core. Commit message: * lisp/emulation/viper-ex.el (ex-cmd-read-exit): * lisp/org/org.el (org-read-date-minibuffer-local-map): * lisp/progmodes/hideshow.el (hs-hide-block-at-point): * lisp/progmodes/sql.el (sql-end-of-statement): Call looking-back as advertised. Copyright-paperwork-exempt: yes diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el index edc71ea..3fdeadb 100644 --- a/lisp/emulation/viper-ex.el +++ b/lisp/emulation/viper-ex.el @@ -548,9 +548,9 @@ ex-cmd-read-exit (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) (set-buffer viper-ex-work-buf) (goto-char (point-max))) - (cond ((looking-back quit-regex1) (exit-minibuffer)) - ((looking-back stay-regex) (insert " ")) - ((looking-back quit-regex2) (exit-minibuffer)) + (cond ((looking-back quit-regex1 nil) (exit-minibuffer)) + ((looking-back stay-regex nil) (insert " ")) + ((looking-back quit-regex2 nil) (exit-minibuffer)) (t (insert " "))))) =20 (declare-function viper-tmp-insert-at-eob "viper-cmd" (msg)) diff --git a/lisp/org/org.el b/lisp/org/org.el index 02a7a0c..2659a4d 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -16249,7 +16249,7 @@ org-read-date-minibuffer-local-map (org-defkey map (kbd ".") (lambda () (interactive) ;; Are we at the beginning of the prompt? - (if (looking-back "^[^:]+: ") + (if (looking-back "^[^:]+: " nil) (org-eval-in-calendar '(calendar-goto-today)) (insert ".")))) (org-defkey map (kbd "C-.") diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 0e4e670..5328526 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -582,7 +582,7 @@ hs-hide-block-at-point (setq p (line-end-position))) ;; `q' is the point at the end of the block (hs-forward-sexp mdata 1) - (setq q (if (looking-back hs-block-end-regexp) + (setq q (if (looking-back hs-block-end-regexp nil) (match-beginning 0) (point))) (when (and (< p q) (> (count-lines p q) 1)) diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index d6c9516..06ef4df 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -2790,7 +2790,7 @@ sql-end-of-statement ;; Iterate until we've moved the desired number of stmt ends (while (not (=3D (cl-signum arg) 0)) ;; if we're looking at the terminator, jump by 2 - (if (or (and (> 0 arg) (looking-back term)) + (if (or (and (> 0 arg) (looking-back term nil)) (and (< 0 arg) (looking-at term))) (setq n 2) (setq n 1)) In GNU Emacs 26.0.50.5 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) of 2017-01-06 built on linux-qg7d Repository revision: 8f0376309ee37e4f1da21d78971c4df2df5fd7b6 Windowing system distributor 'The X.Org Foundation', version 11.0.11203000 System Description: openSUSE 12.2 (x86_64) ------------=_1564522922-17912-1--