From unknown Sat Jun 14 03:56:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Feb 2019 20:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34419 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 34419@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.154983182212144 (code B ref -1); Sun, 10 Feb 2019 20:51:02 +0000 Received: (at submit) by debbugs.gnu.org; 10 Feb 2019 20:50:22 +0000 Received: from localhost ([127.0.0.1]:42836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gsw3R-00039o-Rw for submit@debbugs.gnu.org; Sun, 10 Feb 2019 15:50:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33045) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gsw3P-00039b-VX for submit@debbugs.gnu.org; Sun, 10 Feb 2019 15:50:20 -0500 Received: from lists.gnu.org ([209.51.188.17]:36120) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gsw38-0004os-9j for submit@debbugs.gnu.org; Sun, 10 Feb 2019 15:50:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47045) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gsw37-0004su-9j for bug-gnu-emacs@gnu.org; Sun, 10 Feb 2019 15:50:02 -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,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gsvsi-0008Ir-Be for bug-gnu-emacs@gnu.org; Sun, 10 Feb 2019 15:39:27 -0500 Received: from mail-ot1-x342.google.com ([2607:f8b0:4864:20::342]:41306) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gsvsU-0007mg-Gn for bug-gnu-emacs@gnu.org; Sun, 10 Feb 2019 15:39:11 -0500 Received: by mail-ot1-x342.google.com with SMTP id u16so14267564otk.8 for ; Sun, 10 Feb 2019 12:37:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=/gjXdm6fMfs/JgSb9A797mWOrc2vdTzf269vRwqwxEg=; b=Hc1EFV4V2M0FGwODsl3VOJ1YC0vOIE0bXGVMCxE+ULYx0JERoR94GVvX7TAefg/XgN VqN+sIB/DPC6NaQP+MWhcLl6qWaUbdx5CN905Y38rBhZV884EShVZIBJRNOn52KmkcEa MfbaoDBcWlHa2mKlFdf4j30eLQ7XPKmL/zIR6kszLMTO374vD8+Vso1dTqqrfOJ/6qB7 w8Tgh3UfuCWFcwSHr9T2H3TKn25Hccs//S0NCPRy2BzIknelHZSyz9EJTTgc/fs6kyYN y8qnXjbU0OB9ev7YoIonIHW9aSJRK+Ey/MFOZ8uKGQQmxmLWQFFcK47xtNaG0UL6zuyR NZag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=/gjXdm6fMfs/JgSb9A797mWOrc2vdTzf269vRwqwxEg=; b=tTuN1S1lEqsBRJ2I+WeEOToKFyO2G2ru2zsFfUvB11o0njTmElXBAYL2E7dDb7koRC CukiCv6ZbNLL88j0nDwy4jDOCIFu/3CSPNI/Leqc8m7Wwg9t876XPxZ90BdEQevXlc0u 0S+tgkYHyFSEpSxQRAqiihW8rzpdMW6tDyrVW+48+WY0eDs6i4IuE2c5DHTjZJdQ1Ve+ aeTWVAOaPqnr3D6+zM/sybxU4rGMg4OY4DjdIXfDfvOMEnDfOGdZ0876X6n2wmfgU+8U 1qikJmHVswGKHmMOT2wn/YaEs0nI7GhM9LST/yHtATfqeo5kgCSpSVgzRyHTqKEUAgN9 d/Xg== X-Gm-Message-State: AHQUAubibU5UcnrOeGHooNikqIFMMpRRUYDnRwYjm7t3oG0eFqOxMeRw +UsYMrbjTp1qQVFJWBWhTjPT9q1h X-Google-Smtp-Source: AHgI3IYzgq5gpi8Ex5rjI27yIKCHrxhUIOoHkMOVE4CT5/qigT8txXO7Qk8EaUh6Ex7YZIq7qKs1zg== X-Received: by 2002:a9d:6c18:: with SMTP id f24mr384849otq.2.1549831049772; Sun, 10 Feb 2019 12:37:29 -0800 (PST) Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id n3sm4647625oia.3.2019.02.10.12.37.28 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 10 Feb 2019 12:37:28 -0800 (PST) User-agent: mu4e 1.1.0; emacs 27.0.50 From: Alex Branham Date: Sun, 10 Feb 2019 14:37:26 -0600 Message-ID: <87o97jnzw9.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::342 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 1.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: -0.0 (/) Hi - I'd like to apply the following patch to enable lexical binding in conf-mode.el. OK to apply to master, or should I split the documentation changes into a separate commit and apply it to emacs-26? Thanks, Alex >From 33cd3bc0655dd861a63854bfc0762990da46a7cc Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Sun, 10 Feb 2019 14:32:29 -0600 Subject: [PATCH] * lisp/textmodes/conf-mode.el: Use lexical binding (conf-align-assignments): (conf-quote-normal): (conf-mode-initialize): Fix documentation --- lisp/textmodes/conf-mode.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/textmodes/conf-mode.el b/lisp/textmodes/conf-mode.el index ad79ca4c26..ad9f60fabc 100644 --- a/lisp/textmodes/conf-mode.el +++ b/lisp/textmodes/conf-mode.el @@ -1,4 +1,4 @@ -;;; conf-mode.el --- Simple major mode for editing conf/ini/properties files +;;; conf-mode.el --- Simple major mode for editing conf/ini/properties files -*- lexical-binding: t; -*- ;; Copyright (C) 2004-2019 Free Software Foundation, Inc. @@ -281,10 +281,10 @@ whitespace.") ;; If anybody can figure out how to get the same effect by configuring ;; `align', I'd be glad to hear. (defun conf-align-assignments (&optional arg) - (interactive "P") "Align the assignments in the buffer or active region. In Transient Mark mode, if the mark is active, operate on the contents of the region. Otherwise, operate on the whole buffer." + (interactive "P") (setq arg (if arg (prefix-numeric-value arg) conf-assignment-column)) @@ -323,7 +323,7 @@ contents of the region. Otherwise, operate on the whole buffer." (defun conf-quote-normal (arg) "Set the syntax of \\=' and \" to punctuation. -With prefix arg, only do it for \\=' if 1, or only for \" if 2. +With prefix ARG, only do it for \\=' if 1, or only for \" if 2. This only affects the current buffer. Some conf files use quotes to delimit strings, while others allow quotes as simple parts of the assigned value. In those files font locking will be wrong, @@ -442,7 +442,7 @@ See also `conf-space-mode', `conf-colon-mode', `conf-javaprop-mode', (run-mode-hooks 'conf-mode-hook))) (defun conf-mode-initialize (comment &optional font-lock) - "Initializations for sub-modes of conf-mode. + "Initializations for sub-modes of `conf-mode'. COMMENT initializes `comment-start' and `comment-start-skip'. The optional arg FONT-LOCK is the value for FONT-LOCK-KEYWORDS." (set (make-local-variable 'comment-start) comment) -- 2.19.2 From unknown Sat Jun 14 03:56:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Feb 2019 15:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34419 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Alex Branham Cc: 34419@debbugs.gnu.org Received: via spool by 34419-submit@debbugs.gnu.org id=B34419.154990032022896 (code B ref 34419); Mon, 11 Feb 2019 15:52:02 +0000 Received: (at 34419) by debbugs.gnu.org; 11 Feb 2019 15:52:00 +0000 Received: from localhost ([127.0.0.1]:43950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gtDsG-0005xE-Cv for submit@debbugs.gnu.org; Mon, 11 Feb 2019 10:52:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48829) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gtDsE-0005wj-14 for 34419@debbugs.gnu.org; Mon, 11 Feb 2019 10:51:59 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtDs4-0003ST-7V; Mon, 11 Feb 2019 10:51:50 -0500 Received: from [176.228.60.248] (port=3354 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gtDs1-0000PW-Ei; Mon, 11 Feb 2019 10:51:46 -0500 Date: Mon, 11 Feb 2019 17:51:31 +0200 Message-Id: <83sgwul3wc.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87o97jnzw9.fsf@gmail.com> (message from Alex Branham on Sun, 10 Feb 2019 14:37:26 -0600) References: <87o97jnzw9.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.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: -1.0 (-) > From: Alex Branham > Date: Sun, 10 Feb 2019 14:37:26 -0600 > > I'd like to apply the following patch to enable lexical binding in > conf-mode.el. Can you tell how did you test the result to make sure no bugs will be introduced by lexical-binding in this package? I see no test suite for it. > OK to apply to master, or should I split the documentation > changes into a separate commit and apply it to emacs-26? The changes to the documentation are too minor to bother splitting them, IMO. > (conf-align-assignments): > (conf-quote-normal): > (conf-mode-initialize): Fix documentation There's no file name in this log message, and it is under-filled (did you use change-log-mode?). Also, our style is to say "Doc fix" or "Docstring fix" in these cases. Finally, please mention the bug number in the log message. Thanks. From unknown Sat Jun 14 03:56:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Feb 2019 22:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34419 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 34419@debbugs.gnu.org Received: via spool by 34419-submit@debbugs.gnu.org id=B34419.154992403129329 (code B ref 34419); Mon, 11 Feb 2019 22:28:02 +0000 Received: (at 34419) by debbugs.gnu.org; 11 Feb 2019 22:27:11 +0000 Received: from localhost ([127.0.0.1]:44209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gtK2e-0007cw-Uv for submit@debbugs.gnu.org; Mon, 11 Feb 2019 17:27:11 -0500 Received: from mail-ot1-f45.google.com ([209.85.210.45]:39350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gtK2c-0007ci-Vp for 34419@debbugs.gnu.org; Mon, 11 Feb 2019 17:27:07 -0500 Received: by mail-ot1-f45.google.com with SMTP id n8so1005852otl.6 for <34419@debbugs.gnu.org>; Mon, 11 Feb 2019 14:27:06 -0800 (PST) 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=QIPKzMPxZlsCLrjoXmo0LeIsHBZKbUw3RkeqsfbrNEs=; b=f32m/dyaXQl8x1GBDkkWo63aHUXv0EUVjGtaSWSFTyMxaZKG9PYSqkAJ6aJL2P3W9r ChE6BGcbu61vzOLX6P0EGJLJRUYlgvJVQ7rRICxVzOlAk8hfm1EgPwLgmgkAmhD/8Us5 HHE4wdEs8ZLCeMYBaymMj2MHHhiFN9sQmrE3YxRxBwR+e8I0/n5m4JcAJZWPxFgeDFT4 GyKVSSu90RR5HyNQ7OidSnVgbPOSJBg7iKew+CU002DcRqrxrHpzNcPwW4b2mrE4QiEW jw4Ad0u+d87OBnimxPaYk9jKMQdYHKi8k11GA/GG2Jp6J1u5d2ITlMMQM+Fj5Q2e3qeF BEGA== 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=QIPKzMPxZlsCLrjoXmo0LeIsHBZKbUw3RkeqsfbrNEs=; b=mJoSsNE0AEsdWyRCF+hv6choJhwLUbDpBGJ67decaMWkTcx1XKILKULk5LmtxAJNkj 82m3pt5bUPLUMXxr61a2EOX7YGaC51I//dBOV2XPz3GrcCKVRwmyojRzz4rCM+PB74op pRgJFGLYXePz5c2vG9ijSDB9g+WDq29p/GtPwDt2r8+IRYWRxCYmixpMi1dKwy67S010 eg4lNT2UDGyZ5IczUuyuASDcRjHkaFe0ycjjSZD0Qwiolp93GDMeLCuVzWJSOZ6BdBUD 3K+O7pwOqa0XC3qfr82BwyrKiPnAJTab8u8Y/ANTS/nY/Gsdq+R7FeSp9cgjZt9wFQLk p99Q== X-Gm-Message-State: AHQUAuZPq2+T1W8W9CyTqrXP93Qtrw7Os5yEeFd8a2K6DlKcf9u+1uyX kZZp5LXLRrP9umlQZYX8gLlF7+TT X-Google-Smtp-Source: AHgI3IYHp+Vyqyzr4lGOTZMVTLUmUDHCmMo+CSAKijDx7nb/XP3TwWqkOLJFki6ODt7sMZ1rMCBfVw== X-Received: by 2002:a9d:68ce:: with SMTP id i14mr482038oto.143.1549924020936; Mon, 11 Feb 2019 14:27:00 -0800 (PST) Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id r16sm2489833oie.25.2019.02.11.14.26.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Feb 2019 14:26:59 -0800 (PST) References: <87o97jnzw9.fsf@gmail.com> <83sgwul3wc.fsf@gnu.org> User-agent: mu4e 1.1.0; emacs 27.0.50 From: Alex Branham In-reply-to: <83sgwul3wc.fsf@gnu.org> Date: Mon, 11 Feb 2019 16:26:57 -0600 Message-ID: <87va1qm05q.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.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: -1.0 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain On Mon 11 Feb 2019 at 09:51, Eli Zaretskii wrote: >> From: Alex Branham >> Date: Sun, 10 Feb 2019 14:37:26 -0600 >> >> I'd like to apply the following patch to enable lexical binding in >> conf-mode.el. > > Can you tell how did you test the result to make sure no bugs will be > introduced by lexical-binding in this package? I see no test suite > for it. Mostly manual testing. conf-mode isn't that complicated; it's mostly dealing with font locking. There are a lot of examples in the docstring though so I've attached a patch that adds some tests based on those. The tests pass for me both before lexical binding and after. I don't need to modify the tests/Makefile.in file to have these run, right? >> OK to apply to master, or should I split the documentation >> changes into a separate commit and apply it to emacs-26? > > The changes to the documentation are too minor to bother splitting > them, IMO. That's what I figured. Just wanted to make since `conf-align-assignments' didn't have documentation before this (well, not that describe-function would report, anyway). >> (conf-align-assignments): >> (conf-quote-normal): >> (conf-mode-initialize): Fix documentation > > There's no file name in this log message, and it is under-filled (did > you use change-log-mode?). Also, our style is to say "Doc fix" or > "Docstring fix" in these cases. Finally, please mention the bug > number in the log message. The file name is in the summary line. Is that not allowed? I was basing it off of ac1e5a5e2ed7c6cf5bec50e5ebf7fab6792230bd which looks similar. Either way, the attached patch should be OK I think. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Use-lexical-binding-for-conf-mode.patch Content-Transfer-Encoding: quoted-printable From=20a2ec79dddbb60f7875b1b492c8e960f6ab331d73 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Sun, 10 Feb 2019 14:32:29 -0600 Subject: [PATCH 1/2] Use lexical binding for conf-mode * lisp/textmodes/conf-mode.el: Use lexical binding. (conf-align-assignments, conf-quote-normal, conf-mode-initialize): Doc fix. =2D-- lisp/textmodes/conf-mode.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/textmodes/conf-mode.el b/lisp/textmodes/conf-mode.el index ad79ca4c26..ad9f60fabc 100644 =2D-- a/lisp/textmodes/conf-mode.el +++ b/lisp/textmodes/conf-mode.el @@ -1,4 +1,4 @@ =2D;;; conf-mode.el --- Simple major mode for editing conf/ini/properties f= iles +;;; conf-mode.el --- Simple major mode for editing conf/ini/properties fil= es -*- lexical-binding: t; -*- =20 ;; Copyright (C) 2004-2019 Free Software Foundation, Inc. =20 @@ -281,10 +281,10 @@ whitespace.") ;; If anybody can figure out how to get the same effect by configuring ;; `align', I'd be glad to hear. (defun conf-align-assignments (&optional arg) =2D (interactive "P") "Align the assignments in the buffer or active region. In Transient Mark mode, if the mark is active, operate on the contents of the region. Otherwise, operate on the whole buffer." + (interactive "P") (setq arg (if arg (prefix-numeric-value arg) conf-assignment-column)) @@ -323,7 +323,7 @@ contents of the region. Otherwise, operate on the whol= e buffer." =20 (defun conf-quote-normal (arg) "Set the syntax of \\=3D' and \" to punctuation. =2DWith prefix arg, only do it for \\=3D' if 1, or only for \" if 2. +With prefix ARG, only do it for \\=3D' if 1, or only for \" if 2. This only affects the current buffer. Some conf files use quotes to delimit strings, while others allow quotes as simple parts of the assigned value. In those files font locking will be wrong, @@ -442,7 +442,7 @@ See also `conf-space-mode', `conf-colon-mode', `conf-ja= vaprop-mode', (run-mode-hooks 'conf-mode-hook))) =20 (defun conf-mode-initialize (comment &optional font-lock) =2D "Initializations for sub-modes of conf-mode. + "Initializations for sub-modes of `conf-mode'. COMMENT initializes `comment-start' and `comment-start-skip'. The optional arg FONT-LOCK is the value for FONT-LOCK-KEYWORDS." (set (make-local-variable 'comment-start) comment) =2D-=20 2.19.2 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-Add-basic-conf-mode-tests.patch Content-Transfer-Encoding: quoted-printable From=20d965720495549b92f7a57836a749487ee8201ef5 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Mon, 11 Feb 2019 16:08:55 -0600 Subject: [PATCH 2/2] Add basic conf-mode tests * test/lisp/textmodes/conf-mode-tests.el: New file with tests for conf-mode. Mostly taken from conf-mode docstrings. =2D-- test/lisp/textmodes/conf-mode-tests.el | 204 +++++++++++++++++++++++++ 1 file changed, 204 insertions(+) create mode 100644 test/lisp/textmodes/conf-mode-tests.el diff --git a/test/lisp/textmodes/conf-mode-tests.el b/test/lisp/textmodes/c= onf-mode-tests.el new file mode 100644 index 0000000000..5d79ceec96 =2D-- /dev/null +++ b/test/lisp/textmodes/conf-mode-tests.el @@ -0,0 +1,204 @@ +;;; conf-mode-tests.el --- Test suite for conf mode -*- lexical-binding: = t; -*- + +;; Copyright (C) 2016-2019 Free Software Foundation, Inc. + +;; Author: J. Alexander Branham +;; Keywords: internal + +;; This file is part of GNU Emacs. + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;;; Code: +(require 'conf-mode) +(require 'ert) + +(ert-deftest conf-test-align-assignments () + "Test for `conf-align-assignments'." + (with-temp-buffer + (insert "foo: bar\nbar: baz") + (conf-colon-mode) + (conf-align-assignments) + (should (equal (buffer-string) + "foo: bar\nbar: b= az")))) + +(ert-deftest conf-test-font-lock () + (with-temp-buffer + (insert "foo: bar\nbar: baz") + (conf-colon-mode) + (font-lock-mode) + (font-lock-ensure) + (goto-char (point-min)) + (should (equal (face-at-point) 'font-lock-variable-name-face)) + (search-forward "bar") + (should-not (face-at-point)))) + +(ert-deftest conf-test-windows-mode () + (with-temp-buffer + ;; from `conf-windows-mode' docstring: + (insert "[ExtShellFolderViews] +Default=3D{5984FFE0-28D4-11CF-AE66-08002B2E1262} +{5984FFE0-28D4-11CF-AE66-08002B2E1262}=3D{5984FFE0-28D4-11CF-AE66-08002B2E= 1262} + +[{5984FFE0-28D4-11CF-AE66-08002B2E1262}] +PersistMoniker=3Dfile://Folder.htt") + (goto-char (point-min)) + (conf-windows-mode) + (font-lock-mode) + (font-lock-ensure) + (search-forward "ExtShell") + (should (equal (face-at-point) 'font-lock-type-face)) + (search-forward "Defau") + (should (equal (face-at-point) 'font-lock-variable-name-face)) + (forward-line) + (beginning-of-line) + (should (equal (face-at-point) 'font-lock-variable-name-face)) + (forward-line 2) + (should-not (face-at-point)) + (forward-char) + (should (equal (face-at-point) 'font-lock-type-face)))) + +(ert-deftest conf-test-javaprop-mode () + (with-temp-buffer + ;; From `conf-javaprop-mode' docstring + (insert "// another kind of comment +/* yet another */ + +name:value +name=3Dvalue +name value +x.1 =3D +x.2.y.1.z.1 =3D +x.2.y.1.z.2.zz =3D") + (goto-char (point-min)) + (conf-javaprop-mode) + (font-lock-mode) + (font-lock-ensure) + (should (equal (face-at-point) 'font-lock-comment-delimiter-face)) + (forward-char 3) + (should (equal (face-at-point) 'font-lock-comment-face)) + (search-forward "*") + (should (equal (face-at-point) 'font-lock-comment-delimiter-face)) + (while (search-forward "nam" nil t) + (should (equal (face-at-point) 'font-lock-variable-name-face)) + (search-forward "val") + (should-not (face-at-point))) + (while (re-search-forward "a-z" nil t) + (backward-char) + (should (equal (face-at-point) 'font-lock-variable-name-face)) + (re-search-forward "[0-0]" nil t) + (backward-char) + (should (equal (face-at-point) 'font-lock-constant-face))))) + +(ert-deftest conf-test-space-mode () + ;; From `conf-space-mode' docstring. + (with-temp-buffer + (insert "image/jpeg jpeg jpg jpe +image/png png +image/tiff tiff tif +") + (goto-char (point-min)) + (conf-space-mode) + (font-lock-mode) + (font-lock-ensure) + (should (equal (face-at-point) 'font-lock-variable-name-face)) + (forward-char 15) + (should-not (face-at-point)))) + +(ert-deftest conf-test-colon-mode () + ;; From `conf-colon-mode' docstring. + (with-temp-buffer + (insert " : \"\\241\" exclamdown + : \"\\242\" cent") + (goto-char (point-min)) + (conf-colon-mode) + (font-lock-mode) + (font-lock-ensure) + (should (equal (face-at-point) 'font-lock-variable-name-face)) + (search-forward "24") + (should (equal (face-at-point) 'font-lock-string-face)) + (forward-line) + (should (equal (face-at-point) 'font-lock-variable-name-face)))) + +(ert-deftest conf-test-ppd-mode () + ;; From `conf-ppd-mode' docstring. + (with-temp-buffer + (insert "*DefaultTransfer: Null +*Transfer Null.Inverse: \"{ 1 exch sub }\"") + (goto-char (point-min)) + (conf-ppd-mode) + (font-lock-mode) + (font-lock-ensure) + (should (equal (face-at-point) 'font-lock-variable-name-face)) + (search-forward "Nul") + (should-not (face-at-point)))) + +(ert-deftest conf-test-xdefaults-mode () + ;; From `conf-xdefaults-mode' docstring. + (with-temp-buffer + (insert "*background: gray99 +*foreground: black") + (goto-char (point-min)) + (conf-xdefaults-mode) + (font-lock-mode) + (font-lock-ensure) + (should (equal (face-at-point) 'font-lock-variable-name-face)) + (search-forward "gray") + (should-not (face-at-point)))) + +(ert-deftest conf-test-toml-mode () + ;; From `conf-toml-mode' docstring. + (with-temp-buffer + (insert "\[entry] +value =3D \"some string\"") + (goto-char (point-min)) + (conf-toml-mode) + (font-lock-mode) + (font-lock-ensure) + (should-not (face-at-point)) + (forward-char) + (should (equal (face-at-point) 'font-lock-type-face)) + (forward-line) + (should (equal (face-at-point) 'font-lock-variable-name-face)) + (search-forward "som") + (should (equal (face-at-point) 'font-lock-string-face)))) + +(ert-deftest conf-test-desktop-mode () + ;; From `conf-desktop-mode' dostring. + (with-temp-buffer + (insert " [Desktop Entry] + Name=3DGNU Image Manipulation Program + Name[oc]=3DEditor d'imatge GIMP + Exec=3Dgimp-2.8 %U + Terminal=3Dfalse") + (goto-char (point-min)) + (conf-desktop-mode) + (font-lock-mode) + (font-lock-ensure) + (search-forward "Desk") + (should (equal (face-at-point) 'font-lock-type-face)) + (search-forward "Nam") + (should (equal (face-at-point) 'font-lock-variable-name-face)) + (forward-char 2) + (should-not (face-at-point)) + (search-forward "[") + (should (equal (face-at-point) 'font-lock-constant-face)))) + + + +(provide 'conf-mode-tests) + +;;; conf-mode-tests.el ends here =2D-=20 2.19.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEeEJ4XAMgliXNXicpHkInolPpmscFAlxh9rEACgkQHkInolPp mscpOAf/WzIa7JdmkLo0rDQ/BKe8tmGF61az0WUp5zrXlVps16cvHGqfYKUsaTK+ z4LPfTTILGQketK0nxTMJXLlZuw30pz6O9U8o13Uamgqkq9zV/67ge25XSvyy4OL 2piQ365DbyPwZxMRfTTZ1vqDfkx4EcT0PDj+ITgaBBHB4YNOrq/8mUfXNyJaFtRP hvGZHx2IiEYko7A4a95sk/UboHQzN1CoV/hkCbVzSCcstrhBLTbFlcoiE/dlL4wX yQZ8eLybuBw4MhF5zi8DwgG8fUecNVeJ7tcmaKWfgpsiD9jNASnMLj4JyZMq0DkK AXE4WaDNTjZ7usq/6n0Au58zbrnNwg== =X+vY -----END PGP SIGNATURE----- --==-=-=-- From unknown Sat Jun 14 03:56:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Feb 2019 08:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34419 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Alex Branham Cc: 34419@debbugs.gnu.org Received: via spool by 34419-submit@debbugs.gnu.org id=B34419.155022043021111 (code B ref 34419); Fri, 15 Feb 2019 08:48:02 +0000 Received: (at 34419) by debbugs.gnu.org; 15 Feb 2019 08:47:10 +0000 Received: from localhost ([127.0.0.1]:48576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1guZ9J-0005UQ-IQ for submit@debbugs.gnu.org; Fri, 15 Feb 2019 03:47:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1guZ9H-0005UD-Mo for 34419@debbugs.gnu.org; Fri, 15 Feb 2019 03:47:08 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56868) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guZ9C-0007ei-DH; Fri, 15 Feb 2019 03:47:02 -0500 Received: from [176.228.60.248] (port=4539 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1guZ9B-0004ap-VD; Fri, 15 Feb 2019 03:47:02 -0500 Date: Fri, 15 Feb 2019 10:46:59 +0200 Message-Id: <834l95o2v1.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87va1qm05q.fsf@gmail.com> (message from Alex Branham on Mon, 11 Feb 2019 16:26:57 -0600) References: <87o97jnzw9.fsf@gmail.com> <83sgwul3wc.fsf@gnu.org> <87va1qm05q.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: 0.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: -1.0 (-) > From: Alex Branham > Cc: 34419@debbugs.gnu.org > Date: Mon, 11 Feb 2019 16:26:57 -0600 > > > Can you tell how did you test the result to make sure no bugs will be > > introduced by lexical-binding in this package? I see no test suite > > for it. > > Mostly manual testing. conf-mode isn't that complicated; it's mostly > dealing with font locking. There are a lot of examples in the docstring > though so I've attached a patch that adds some tests based on those. The > tests pass for me both before lexical binding and after. Thanks for adding the tests. One of them fails for me, see the diagnostics below. > I don't need to modify the tests/Makefile.in file to have these run, > right? Right. > >> (conf-align-assignments): > >> (conf-quote-normal): > >> (conf-mode-initialize): Fix documentation > > > > There's no file name in this log message, and it is under-filled (did > > you use change-log-mode?). Also, our style is to say "Doc fix" or > > "Docstring fix" in these cases. Finally, please mention the bug > > number in the log message. > > The file name is in the summary line. Is that not allowed? I was basing > it off of ac1e5a5e2ed7c6cf5bec50e5ebf7fab6792230bd which looks similar. Bad example, IMO. the problem is that we use the Git log to generate ChangeLog when we prepare a release tarball, and these deviations make malformed ChangeLog entries. > Either way, the attached patch should be OK I think. Thanks. As a further nit, please mention the bug number in the log message when you know it (as you usually do when posting a second version of the patches). Otherwise I need to add that manually with "git commit --amend". Here's the diagnostics from the failed test; can you spot the problem? Test conf-test-align-assignments backtrace: signal(ert-test-failed (((should (equal (buffer-string) "foo: ert-fail(((should (equal (buffer-string) "foo: ba (if (unwind-protect (setq value-2 (apply fn-0 args-1)) (setq form-de (let (form-description-4) (if (unwind-protect (setq value-2 (apply f (let ((value-2 'ert-form-evaluation-aborted-3)) (let (form-descripti (let* ((fn-0 #'equal) (args-1 (condition-case err (let ((signal-hook (progn (insert "foo: bar\nbar: baz") (conf-colon-mode) (conf-align-a (unwind-protect (progn (insert "foo: bar\nbar: baz") (conf-colon-mod (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-b (closure (t) nil (let ((temp-buffer (generate-new-buffer " *temp*")) ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test ert-run-test(#s(ert-test :name conf-test-align-assignments :document ert-run-or-rerun-test(#s(ert--stats :selector (not (tag :unstable)) ert-run-tests((not (tag :unstable)) #f(compiled-function (event-type ert-run-tests-batch((not (tag :unstable))) ert-run-tests-batch-and-exit((not (tag :unstable))) eval((ert-run-tests-batch-and-exit '(not (tag :unstable)))) command-line-1((#("-L" 0 2 (charset cp862)) #(";." 0 2 (charset cp86 command-line() normal-top-level() Test conf-test-align-assignments condition: (ert-test-failed ((should (equal (buffer-string) "foo: bar bar: baz")) :form (equal "foo: bar bar: baz" "foo: bar bar: baz") :value nil :explanation (arrays-of-different-length 21 55 "foo: bar bar: baz" "foo: bar bar: baz" first-mismatch-at 4))) FAILED 1/10 conf-test-align-assignments (0.000000 sec) From unknown Sat Jun 14 03:56:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Feb 2019 13:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34419 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 34419@debbugs.gnu.org Received: via spool by 34419-submit@debbugs.gnu.org id=B34419.155023721023727 (code B ref 34419); Fri, 15 Feb 2019 13:27:02 +0000 Received: (at 34419) by debbugs.gnu.org; 15 Feb 2019 13:26:50 +0000 Received: from localhost ([127.0.0.1]:48682 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gudVy-0006Ac-7p for submit@debbugs.gnu.org; Fri, 15 Feb 2019 08:26:50 -0500 Received: from mail-ot1-f47.google.com ([209.85.210.47]:42728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gudVu-0006AG-QH for 34419@debbugs.gnu.org; Fri, 15 Feb 2019 08:26:47 -0500 Received: by mail-ot1-f47.google.com with SMTP id i5so16414003oto.9 for <34419@debbugs.gnu.org>; Fri, 15 Feb 2019 05:26:46 -0800 (PST) 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=2LBJgiUZJnjfPc+UHhzkXt7MNhshndExFC1V0GAoEOA=; b=tkvK3HRRS4kGyLFJIXz1IOSZNg062iIRYE29JYYsKBSyprNMEejlVRCcIlWd21+mv0 MiHakMRZX0SklXJDnYlXtohc/uw+gfxSJbRco6Q/5B7TyOrnGl3/1rou32Y+3H3HccPh bcnEmvqP87a92Ncm3GTHRMu955adtI8adaqwj2wVALULLKXsFk4IQ4sfMTxYJNOc5vOr XxTeeBg0lv9sobprH9M4/BHQHMYMutoMsJGng3NpbfiZhQhbVC8t7vUbtU+lNUTJA5l9 uxsRmVk7Ro+4VN4GQeMBIrj/hryWVLc9PZMrDXzyPz6SOdCc4l0A1/9DxoDMN5/nr17Q mVaA== 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=2LBJgiUZJnjfPc+UHhzkXt7MNhshndExFC1V0GAoEOA=; b=hy5Xj2vUDZDCtGn76GDunFUOXXYldypYT97DKYmfvLF2i1QrPBApZWYgBUzmguZ2zy MVZLWC0vyPRCF14tGnWkvoc3RzRRhMhVdKAygHhFGw/HEfWipuQ/YBSyqNy4w+Lyi+pQ PLnSCoWjH+NU3TEDPysBCOUdmfixyoNoGkQzoKY48+REI5h3J8/7Ds6vaK3vVrpSUUv+ 3kxb0VVi1/LPTky8FlZR3s3ol7fIiu68t0hj1MUmMup+loRUvDtWsb52kV8enf4xterM fg2bzLjjcCDggAz0DYRXiumqbNyJS/YUyZLfETeFQwX20TIppMT+WM8y32Qf7VQXP0qW SN9g== X-Gm-Message-State: AHQUAuYs1tI5g8R3xkrcA/hg9Lom5emqnH7daLCuAaOSQYfhMvnbpfK+ 25Ytr2g1v9nC33nKSM96kp0LmWd9 X-Google-Smtp-Source: AHgI3IbkNePCPPPQ2DZk8WCwTmPLb8w/ngmGdCqsoTQG1BkfZr2ysmuAgnc6qiWMrr75RdUPq/UQZA== X-Received: by 2002:aca:5c88:: with SMTP id q130mr5526972oib.79.1550237200536; Fri, 15 Feb 2019 05:26:40 -0800 (PST) Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id f7sm2627922otb.56.2019.02.15.05.26.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Feb 2019 05:26:39 -0800 (PST) References: <87o97jnzw9.fsf@gmail.com> <83sgwul3wc.fsf@gnu.org> <87va1qm05q.fsf@gmail.com> <834l95o2v1.fsf@gnu.org> User-agent: mu4e 1.1.0; emacs 27.0.50 From: Alex Branham In-reply-to: <834l95o2v1.fsf@gnu.org> Date: Fri, 15 Feb 2019 07:26:36 -0600 Message-ID: <87mumxnpwz.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.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: -1.0 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri 15 Feb 2019 at 02:46, Eli Zaretskii wrote: >> Either way, the attached patch should be OK I think. > > Thanks. As a further nit, please mention the bug number in the log > message when you know it (as you usually do when posting a second > version of the patches). Otherwise I need to add that manually with > "git commit --amend". I'm not sure why this is so hard for me to remember, sorry. Will try harder in the future (including the attached patch!). > Here's the diagnostics from the failed test; can you spot the problem? Have you changed `conf-assignment-column'? That would cause issues I guess. Here's a patch that sets it in the test: From=20bbc00e4f70425618f5a6ed59a00afe1d1fcf9427 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Fri, 15 Feb 2019 07:17:49 -0600 Subject: [PATCH] Fix a conf-mode test * test/lisp/textmodes/conf-mode-tests.el (conf-test-align-assignments): Set `conf-assignment-column'. Bug#34419 =2D-- test/lisp/textmodes/conf-mode-tests.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/lisp/textmodes/conf-mode-tests.el b/test/lisp/textmodes/c= onf-mode-tests.el index 5d79ceec96..effe8de397 100644 =2D-- a/test/lisp/textmodes/conf-mode-tests.el +++ b/test/lisp/textmodes/conf-mode-tests.el @@ -29,11 +29,12 @@ (ert-deftest conf-test-align-assignments () "Test for `conf-align-assignments'." (with-temp-buffer =2D (insert "foo: bar\nbar: baz") =2D (conf-colon-mode) =2D (conf-align-assignments) =2D (should (equal (buffer-string) =2D "foo: bar\nbar: = baz")))) + (let ((conf-assignment-column 24)) + (insert "foo: bar\nbar: baz") + (conf-colon-mode) + (conf-align-assignments) + (should (equal (buffer-string) + "foo: bar\nbar: = baz"))))) =20 (ert-deftest conf-test-font-lock () (with-temp-buffer =2D-=20 2.19.2 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Fix-a-conf-mode-test.patch Content-Transfer-Encoding: quoted-printable From=20bbc00e4f70425618f5a6ed59a00afe1d1fcf9427 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Fri, 15 Feb 2019 07:17:49 -0600 Subject: [PATCH] Fix a conf-mode test * test/lisp/textmodes/conf-mode-tests.el (conf-test-align-assignments): Set `conf-assignment-column'. Bug#34419 =2D-- test/lisp/textmodes/conf-mode-tests.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/lisp/textmodes/conf-mode-tests.el b/test/lisp/textmodes/c= onf-mode-tests.el index 5d79ceec96..effe8de397 100644 =2D-- a/test/lisp/textmodes/conf-mode-tests.el +++ b/test/lisp/textmodes/conf-mode-tests.el @@ -29,11 +29,12 @@ (ert-deftest conf-test-align-assignments () "Test for `conf-align-assignments'." (with-temp-buffer =2D (insert "foo: bar\nbar: baz") =2D (conf-colon-mode) =2D (conf-align-assignments) =2D (should (equal (buffer-string) =2D "foo: bar\nbar: = baz")))) + (let ((conf-assignment-column 24)) + (insert "foo: bar\nbar: baz") + (conf-colon-mode) + (conf-align-assignments) + (should (equal (buffer-string) + "foo: bar\nbar: = baz"))))) =20 (ert-deftest conf-test-font-lock () (with-temp-buffer =2D-=20 2.19.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEeEJ4XAMgliXNXicpHkInolPpmscFAlxmvgwACgkQHkInolPp msehAgf+IKY7gZX1eDEHld+pk3P+W2aDHMDbXv3VTfoMB0cyNcWRgWSvM1epbUkg Io6Mz5qFoOzsQf6iyBwcDADwKu8Fx39Wf/43T5AKPrUKeHLFIulPMHERKAuW2hSW BOuGPnHVmWXh3uKGjNlHO6VtmZDKRbtRnYfaErqADC9rC7v/DqNlpALjkHdIfcfX AkytJi9GXhFe04B7IWF6z4TzaS1j3Mwr8buQ33D2J2mL/ukfej9CAeLaeh2yNjn1 Mkulld2ho67j9UjUrOLEIjGprNuICLUOS4Tn0hNapiUzSS2CP8upUTl7RzQGb90P 6VmRx4EppwMkphoGv5heGR1uNmciNg== =xbGv -----END PGP SIGNATURE----- --==-=-=-- From unknown Sat Jun 14 03:56:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Feb 2019 14:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34419 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Alex Branham Cc: 34419@debbugs.gnu.org Received: via spool by 34419-submit@debbugs.gnu.org id=B34419.155023987628404 (code B ref 34419); Fri, 15 Feb 2019 14:12:02 +0000 Received: (at 34419) by debbugs.gnu.org; 15 Feb 2019 14:11:16 +0000 Received: from localhost ([127.0.0.1]:48687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gueCy-0007O4-12 for submit@debbugs.gnu.org; Fri, 15 Feb 2019 09:11:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41171) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gueCv-0007Ns-Q6 for 34419@debbugs.gnu.org; Fri, 15 Feb 2019 09:11:14 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46155) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gueCq-0003Yr-Mf; Fri, 15 Feb 2019 09:11:08 -0500 Received: from [176.228.60.248] (port=4655 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gueCo-00005k-BW; Fri, 15 Feb 2019 09:11:08 -0500 Date: Fri, 15 Feb 2019 16:10:52 +0200 Message-Id: <83va1lm9ar.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87mumxnpwz.fsf@gmail.com> (message from Alex Branham on Fri, 15 Feb 2019 07:26:36 -0600) References: <87o97jnzw9.fsf@gmail.com> <83sgwul3wc.fsf@gnu.org> <87va1qm05q.fsf@gmail.com> <834l95o2v1.fsf@gnu.org> <87mumxnpwz.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: 0.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: -1.0 (-) > From: Alex Branham > Cc: 34419@debbugs.gnu.org > Date: Fri, 15 Feb 2019 07:26:36 -0600 > > > Thanks. As a further nit, please mention the bug number in the log > > message when you know it (as you usually do when posting a second > > version of the patches). Otherwise I need to add that manually with > > "git commit --amend". > > I'm not sure why this is so hard for me to remember, sorry. Will try > harder in the future (including the attached patch!). No sweat, it will come to you in time. > > Here's the diagnostics from the failed test; can you spot the problem? > > Have you changed `conf-assignment-column'? No, I haven't. I run this in batch Emacs, so no local customizations are in effect. > Here's a patch that sets it in the test: Didn't help, same error. This diagnostic: :value nil :explanation (arrays-of-different-length 21 55 gives a clue: one of the strings uses TABs to indent, the other uses spaces. Maybe bind indent-tabs-mode to the value you want when running this test. From unknown Sat Jun 14 03:56:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Feb 2019 17:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34419 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 34419@debbugs.gnu.org Received: via spool by 34419-submit@debbugs.gnu.org id=B34419.155051026230886 (code B ref 34419); Mon, 18 Feb 2019 17:18:02 +0000 Received: (at 34419) by debbugs.gnu.org; 18 Feb 2019 17:17:42 +0000 Received: from localhost ([127.0.0.1]:53166 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gvmY2-000826-CG for submit@debbugs.gnu.org; Mon, 18 Feb 2019 12:17:42 -0500 Received: from mail-ot1-f47.google.com ([209.85.210.47]:34074) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gvmY0-00081s-86 for 34419@debbugs.gnu.org; Mon, 18 Feb 2019 12:17:40 -0500 Received: by mail-ot1-f47.google.com with SMTP id 98so29593622oty.1 for <34419@debbugs.gnu.org>; Mon, 18 Feb 2019 09:17:40 -0800 (PST) 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=reDwAODdQjlKrxKGALa01ZB0m4g1q+TKEmdrnuPdIMo=; b=QbwvVzAnEL5dFDUsL3hIb6vi8DTV8mbmJHb9MT+7mqgR+fzq9YDXzwTBdWotZxtG8c LL5lGHcI4Y7qk4gD5aeEf2ipau+i/s1LrDZBDJjdG03/owz0c8u3EJMxex9Bc+yWwYT8 BVdq5ImKtnTD14RyIqJd9pUDKJGT/hmChb9OyCAr5x6vR+oPEczWBYNhiycDK36k7xzs XVCBs1f76N6X2gOAWUtDUuLliUTBVkH7Nbkafq3J6Al+fjwZdDOAgIiEzTzt+ZGgGCAV bU6eLk9e0Qwd52D53JWp2iCAZ5nsuGyxFbOLYPfwuTrz5C8QXjkoxCB0R0WHWqFZzIh5 GviA== 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=reDwAODdQjlKrxKGALa01ZB0m4g1q+TKEmdrnuPdIMo=; b=cyb/E4C82Pw8bkzMWvf6wia39RYo6sSKrklInG5i3gE32+jpG6SlM4ZF5zvH316JCG Yd7bEn9uWsmto01idvs8UxgNq1PUS2vS7eSFOrEfQ0SZ7ypVc2169txmHz827GpWgXlU IMUSAVQR0nh0xIScbCf547DeFSzGgFnFZA3q6wq9p74J8va4SCkNrocVMDKt9kdV4+8H EoOW3+nqW/P7fnYZAN3CRo+XQiBmsRp3AI48vW32kYTbZIsgD1Q1y5DIViMueXhTyAu7 3GgCwq+pn2Nf2ERvfmDxuraQh8HrCDnCnSQQIhygiUJuzo+8/u064MbD0NNUETZWhyX4 rUAw== X-Gm-Message-State: AHQUAuaedz9REFO5mMfljKilYhzyObsAYrMKY5ImN381ERtZDdh5B61F yngGq6mjUOtxvahcna0GMDDyufRF X-Google-Smtp-Source: AHgI3IbpSMnT6o32Jkka3IoTRKJH5KiypaK20ygPAsWbRNSURqRMMqtj2Y/o13UYaaDASh4kEsFgzw== X-Received: by 2002:aca:c5d5:: with SMTP id v204mr15197312oif.104.1550510253972; Mon, 18 Feb 2019 09:17:33 -0800 (PST) Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id v8sm5062022otq.4.2019.02.18.09.17.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Feb 2019 09:17:32 -0800 (PST) References: <87o97jnzw9.fsf@gmail.com> <83sgwul3wc.fsf@gnu.org> <87va1qm05q.fsf@gmail.com> <834l95o2v1.fsf@gnu.org> <87mumxnpwz.fsf@gmail.com> <83va1lm9ar.fsf@gnu.org> User-agent: mu4e 1.1.0; emacs 27.0.50 From: Alex Branham In-reply-to: <83va1lm9ar.fsf@gnu.org> Date: Mon, 18 Feb 2019 11:17:30 -0600 Message-ID: <871s453tjp.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.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: -1.0 (-) --=-=-= Content-Type: text/plain On Fri 15 Feb 2019 at 08:10, Eli Zaretskii wrote: > Maybe bind indent-tabs-mode to the value you want when > running this test. Sorry for taking a while to respond; the attached patch should fix the issue. Thanks, Alex --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Fix-a-conf-mode-test.patch >From 08027a320721ed52ef92672caf832e089bd7ac25 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Fri, 15 Feb 2019 07:17:49 -0600 Subject: [PATCH] Fix a conf-mode test * test/lisp/textmodes/conf-mode-tests.el (conf-test-align-assignments): Set `conf-assignment-column' and `indent-tabs-mode'. Bug#34419 --- test/lisp/textmodes/conf-mode-tests.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/lisp/textmodes/conf-mode-tests.el b/test/lisp/textmodes/conf-mode-tests.el index 5d79ceec96..33009215bb 100644 --- a/test/lisp/textmodes/conf-mode-tests.el +++ b/test/lisp/textmodes/conf-mode-tests.el @@ -29,11 +29,13 @@ (ert-deftest conf-test-align-assignments () "Test for `conf-align-assignments'." (with-temp-buffer - (insert "foo: bar\nbar: baz") - (conf-colon-mode) - (conf-align-assignments) - (should (equal (buffer-string) - "foo: bar\nbar: baz")))) + (let ((conf-assignment-column 24) + indent-tabs-mode) + (insert "foo: bar\nbar: baz") + (conf-colon-mode) + (conf-align-assignments) + (should (equal (buffer-string) + "foo: bar\nbar: baz"))))) (ert-deftest conf-test-font-lock () (with-temp-buffer -- 2.19.2 --=-=-=-- From unknown Sat Jun 14 03:56:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Feb 2019 17:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34419 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Alex Branham Cc: 34419@debbugs.gnu.org Received: via spool by 34419-submit@debbugs.gnu.org id=B34419.1550511868794 (code B ref 34419); Mon, 18 Feb 2019 17:45:02 +0000 Received: (at 34419) by debbugs.gnu.org; 18 Feb 2019 17:44:28 +0000 Received: from localhost ([127.0.0.1]:53180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gvmxv-0000Ck-Q3 for submit@debbugs.gnu.org; Mon, 18 Feb 2019 12:44:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gvmxt-0000CW-Cm for 34419@debbugs.gnu.org; Mon, 18 Feb 2019 12:44:25 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvmxn-0003kI-V2; Mon, 18 Feb 2019 12:44:20 -0500 Received: from [176.228.60.248] (port=4578 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gvmxn-0008PV-15; Mon, 18 Feb 2019 12:44:19 -0500 Date: Mon, 18 Feb 2019 19:44:24 +0200 Message-Id: <83imxhj8jr.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <871s453tjp.fsf@gmail.com> (message from Alex Branham on Mon, 18 Feb 2019 11:17:30 -0600) References: <87o97jnzw9.fsf@gmail.com> <83sgwul3wc.fsf@gnu.org> <87va1qm05q.fsf@gmail.com> <834l95o2v1.fsf@gnu.org> <87mumxnpwz.fsf@gmail.com> <83va1lm9ar.fsf@gnu.org> <871s453tjp.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: 0.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: -1.0 (-) > From: Alex Branham > Cc: 34419@debbugs.gnu.org > Date: Mon, 18 Feb 2019 11:17:30 -0600 > > > Maybe bind indent-tabs-mode to the value you want when > > running this test. > > Sorry for taking a while to respond; the attached patch should fix the issue. Thanks, this fixes the failure. From unknown Sat Jun 14 03:56:35 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: Alex Branham Subject: bug#34419: closed (Re: bug#34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el) Message-ID: References: <87tvgz7p2z.fsf@gmail.com> <87o97jnzw9.fsf@gmail.com> X-Gnu-PR-Message: they-closed 34419 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 34419@debbugs.gnu.org Date: Tue, 19 Feb 2019 15:53:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1550591582-11478-1" This is a multi-part message in MIME format... ------------=_1550591582-11478-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el 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 34419@debbugs.gnu.org. --=20 34419: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D34419 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1550591582-11478-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 34419-done) by debbugs.gnu.org; 19 Feb 2019 15:52:48 +0000 Received: from localhost ([127.0.0.1]:55432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gw7hQ-0002yh-GH for submit@debbugs.gnu.org; Tue, 19 Feb 2019 10:52:48 -0500 Received: from mail-ot1-f47.google.com ([209.85.210.47]:41002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gw7hO-0002yU-QI for 34419-done@debbugs.gnu.org; Tue, 19 Feb 2019 10:52:47 -0500 Received: by mail-ot1-f47.google.com with SMTP id t7so18532632otk.8 for <34419-done@debbugs.gnu.org>; Tue, 19 Feb 2019 07:52:46 -0800 (PST) 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=lvWKrrQjk3VSpkr3pHwt2+QTz6gScAwdSG2qN1JtUJk=; b=I7snUSQOYwtErLsRLTskLu/AxhfNWJtCLtJkF+Y4z5MPnsbo9/SpEyrwMq2qOPhIbP HNkV+BCACK94gKLDdbE3JBC0ctVVpEdyOsdsLvqufbVhHN/RYSBtISt7P1eJWNLWm4DJ 4FBnKctwNmFZI1cofp3W68l4p6VDCV34Whr2Nza7nh4/OLiq7wae5uajLxdLutGGEaJ2 EoAgXFYMj37RqEHgJ8GHZmdZnrcN33TbJkXMCv2xUl6r20+XjObsrt7SgedE6Ejf+0an IiJHt5ybHPxoey503ypu7kE8RKQMGBgFh2aQA1TpW+d3UUnakeB2LY8idX4d5NCQN0Gk az4Q== 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=lvWKrrQjk3VSpkr3pHwt2+QTz6gScAwdSG2qN1JtUJk=; b=SvZVONPUd5fM+KySjMiiWy6v60mo8W+JXyToZw1/1slcjGEoM62UHKfxFRUu9joncc 46REia3Z68NS3+syAoa3PsEGLAcJ5R9lV4w+RTORJ0GQ1Rkshq35ef1S/3NJUBwO9hrs ndURxNTW3nQK8ru7b4GNBSb+V8xHg+KCVc00pbbKyrXVgtfCkRObN3jSbOJImulYN8II 7yormzEbDUCt+elAITGCuCi953khhMEQKk4xll698puwTkeElBt/uuU4mxwLTmeNQlb7 1YftrE/e+GBuSolJtQ92LXdXD14IVCdY2Y21eAAuxMsMqjz+IFoqJMu+NTMzHJoutTCI ILHA== X-Gm-Message-State: AHQUAuZkPbYa6/Aqzz/bQFAtwQnvx4WYQHvzKXo3mu7Bn2VwBlObOPvD 9elUnVhEv00xKxowIZ3djBCQcOPJ X-Google-Smtp-Source: AHgI3IbJGKDrOA37Q83Xi+wdiyMpxvufPn9IRxd5kSa5mKQGTEWqa8+AOIrto9x2QjIU0en2ghQ0BQ== X-Received: by 2002:a9d:7547:: with SMTP id b7mr2017061otl.244.1550591560678; Tue, 19 Feb 2019 07:52:40 -0800 (PST) Received: from mars (nat-128-62-60-156.public.utexas.edu. [128.62.60.156]) by smtp.gmail.com with ESMTPSA id g128sm4100635oia.32.2019.02.19.07.52.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Feb 2019 07:52:38 -0800 (PST) References: <87o97jnzw9.fsf@gmail.com> <83sgwul3wc.fsf@gnu.org> <87va1qm05q.fsf@gmail.com> <834l95o2v1.fsf@gnu.org> <87mumxnpwz.fsf@gmail.com> <83va1lm9ar.fsf@gnu.org> <871s453tjp.fsf@gmail.com> <83imxhj8jr.fsf@gnu.org> User-agent: mu4e 1.1.0; emacs 27.0.50 From: Alex Branham To: Eli Zaretskii Subject: Re: bug#34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el In-reply-to: <83imxhj8jr.fsf@gnu.org> Date: Tue, 19 Feb 2019 09:52:36 -0600 Message-ID: <87tvgz7p2z.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 34419-done Cc: 34419-done@debbugs.gnu.org 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.0 (-) --=-=-= Content-Type: text/plain On Mon 18 Feb 2019 at 11:44, Eli Zaretskii wrote: > Thanks, this fixes the failure. Thanks, I'll close the bug report then. Alex --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEeEJ4XAMgliXNXicpHkInolPpmscFAlxsJkQACgkQHkInolPp mscYKQgAsyKIC+ctvp7PMURCJ7gp6rlkAXjzc2lYCFgG7wU3iABV2OyqOuvBafUR EMOxpP0balX1ZGKtcsHwOLzShUzL593TQjgSkAiP+owvjlOJnFdu2UA27EvD1/n0 y5KwIrGrA7sSxU1f1WyIceOwOHOThTxPsaIAoPTmWpxRu3w0SzGz+gIzLa/cyZHc D8Bz5D0Xh2wIlTzaMHOUandcGf19ycCHQ2pZ/lUQcRC6JLh8AwMHZv32WGC4OgfN mWlsG+5jO7mTq++Xq3PIl3klqx89uVFfxaTT3A8HBBhZUHep7VKsqsImtL1FzfxE WUNtJYyQ32OJTqP3X/n11bZE+myJEQ== =U66n -----END PGP SIGNATURE----- --=-=-=-- ------------=_1550591582-11478-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 10 Feb 2019 20:50:22 +0000 Received: from localhost ([127.0.0.1]:42836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gsw3R-00039o-Rw for submit@debbugs.gnu.org; Sun, 10 Feb 2019 15:50:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33045) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gsw3P-00039b-VX for submit@debbugs.gnu.org; Sun, 10 Feb 2019 15:50:20 -0500 Received: from lists.gnu.org ([209.51.188.17]:36120) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gsw38-0004os-9j for submit@debbugs.gnu.org; Sun, 10 Feb 2019 15:50:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47045) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gsw37-0004su-9j for bug-gnu-emacs@gnu.org; Sun, 10 Feb 2019 15:50:02 -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,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gsvsi-0008Ir-Be for bug-gnu-emacs@gnu.org; Sun, 10 Feb 2019 15:39:27 -0500 Received: from mail-ot1-x342.google.com ([2607:f8b0:4864:20::342]:41306) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gsvsU-0007mg-Gn for bug-gnu-emacs@gnu.org; Sun, 10 Feb 2019 15:39:11 -0500 Received: by mail-ot1-x342.google.com with SMTP id u16so14267564otk.8 for ; Sun, 10 Feb 2019 12:37:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=/gjXdm6fMfs/JgSb9A797mWOrc2vdTzf269vRwqwxEg=; b=Hc1EFV4V2M0FGwODsl3VOJ1YC0vOIE0bXGVMCxE+ULYx0JERoR94GVvX7TAefg/XgN VqN+sIB/DPC6NaQP+MWhcLl6qWaUbdx5CN905Y38rBhZV884EShVZIBJRNOn52KmkcEa MfbaoDBcWlHa2mKlFdf4j30eLQ7XPKmL/zIR6kszLMTO374vD8+Vso1dTqqrfOJ/6qB7 w8Tgh3UfuCWFcwSHr9T2H3TKn25Hccs//S0NCPRy2BzIknelHZSyz9EJTTgc/fs6kyYN y8qnXjbU0OB9ev7YoIonIHW9aSJRK+Ey/MFOZ8uKGQQmxmLWQFFcK47xtNaG0UL6zuyR NZag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=/gjXdm6fMfs/JgSb9A797mWOrc2vdTzf269vRwqwxEg=; b=tTuN1S1lEqsBRJ2I+WeEOToKFyO2G2ru2zsFfUvB11o0njTmElXBAYL2E7dDb7koRC CukiCv6ZbNLL88j0nDwy4jDOCIFu/3CSPNI/Leqc8m7Wwg9t876XPxZ90BdEQevXlc0u 0S+tgkYHyFSEpSxQRAqiihW8rzpdMW6tDyrVW+48+WY0eDs6i4IuE2c5DHTjZJdQ1Ve+ aeTWVAOaPqnr3D6+zM/sybxU4rGMg4OY4DjdIXfDfvOMEnDfOGdZ0876X6n2wmfgU+8U 1qikJmHVswGKHmMOT2wn/YaEs0nI7GhM9LST/yHtATfqeo5kgCSpSVgzRyHTqKEUAgN9 d/Xg== X-Gm-Message-State: AHQUAubibU5UcnrOeGHooNikqIFMMpRRUYDnRwYjm7t3oG0eFqOxMeRw +UsYMrbjTp1qQVFJWBWhTjPT9q1h X-Google-Smtp-Source: AHgI3IYzgq5gpi8Ex5rjI27yIKCHrxhUIOoHkMOVE4CT5/qigT8txXO7Qk8EaUh6Ex7YZIq7qKs1zg== X-Received: by 2002:a9d:6c18:: with SMTP id f24mr384849otq.2.1549831049772; Sun, 10 Feb 2019 12:37:29 -0800 (PST) Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id n3sm4647625oia.3.2019.02.10.12.37.28 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 10 Feb 2019 12:37:28 -0800 (PST) User-agent: mu4e 1.1.0; emacs 27.0.50 From: Alex Branham To: bug-gnu-emacs@gnu.org Subject: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el Date: Sun, 10 Feb 2019 14:37:26 -0600 Message-ID: <87o97jnzw9.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::342 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 1.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: -0.0 (/) Hi - I'd like to apply the following patch to enable lexical binding in conf-mode.el. OK to apply to master, or should I split the documentation changes into a separate commit and apply it to emacs-26? Thanks, Alex >From 33cd3bc0655dd861a63854bfc0762990da46a7cc Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Sun, 10 Feb 2019 14:32:29 -0600 Subject: [PATCH] * lisp/textmodes/conf-mode.el: Use lexical binding (conf-align-assignments): (conf-quote-normal): (conf-mode-initialize): Fix documentation --- lisp/textmodes/conf-mode.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/textmodes/conf-mode.el b/lisp/textmodes/conf-mode.el index ad79ca4c26..ad9f60fabc 100644 --- a/lisp/textmodes/conf-mode.el +++ b/lisp/textmodes/conf-mode.el @@ -1,4 +1,4 @@ -;;; conf-mode.el --- Simple major mode for editing conf/ini/properties files +;;; conf-mode.el --- Simple major mode for editing conf/ini/properties files -*- lexical-binding: t; -*- ;; Copyright (C) 2004-2019 Free Software Foundation, Inc. @@ -281,10 +281,10 @@ whitespace.") ;; If anybody can figure out how to get the same effect by configuring ;; `align', I'd be glad to hear. (defun conf-align-assignments (&optional arg) - (interactive "P") "Align the assignments in the buffer or active region. In Transient Mark mode, if the mark is active, operate on the contents of the region. Otherwise, operate on the whole buffer." + (interactive "P") (setq arg (if arg (prefix-numeric-value arg) conf-assignment-column)) @@ -323,7 +323,7 @@ contents of the region. Otherwise, operate on the whole buffer." (defun conf-quote-normal (arg) "Set the syntax of \\=' and \" to punctuation. -With prefix arg, only do it for \\=' if 1, or only for \" if 2. +With prefix ARG, only do it for \\=' if 1, or only for \" if 2. This only affects the current buffer. Some conf files use quotes to delimit strings, while others allow quotes as simple parts of the assigned value. In those files font locking will be wrong, @@ -442,7 +442,7 @@ See also `conf-space-mode', `conf-colon-mode', `conf-javaprop-mode', (run-mode-hooks 'conf-mode-hook))) (defun conf-mode-initialize (comment &optional font-lock) - "Initializations for sub-modes of conf-mode. + "Initializations for sub-modes of `conf-mode'. COMMENT initializes `comment-start' and `comment-start-skip'. The optional arg FONT-LOCK is the value for FONT-LOCK-KEYWORDS." (set (make-local-variable 'comment-start) comment) -- 2.19.2 ------------=_1550591582-11478-1--