From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 24 08:55:46 2019 Received: (at submit) by debbugs.gnu.org; 24 Apr 2019 12:55:46 +0000 Received: from localhost ([127.0.0.1]:55278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJHRB-0001IN-IK for submit@debbugs.gnu.org; Wed, 24 Apr 2019 08:55:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJHR9-0001I7-Lg for submit@debbugs.gnu.org; Wed, 24 Apr 2019 08:55:44 -0400 Received: from lists.gnu.org ([209.51.188.17]:39661) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hJHR3-0004Dr-Ch for submit@debbugs.gnu.org; Wed, 24 Apr 2019 08:55:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJHR1-0001kD-EA for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2019 08:55:37 -0400 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, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJHQz-00047q-1Q for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2019 08:55:35 -0400 Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]:36146) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hJHQv-00044x-J9 for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2019 08:55:30 -0400 Received: by mail-oi1-x231.google.com with SMTP id l203so14169320oia.3 for ; Wed, 24 Apr 2019 05:55:28 -0700 (PDT) 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=5xSJnIzDiRUkIQZHjlT8e5Lx3/kKLXsoFfrCfP4nmwY=; b=maPmyMVPXAoLwg4w/2k965IqQxOhn0Mewg4X7UTSuccaR1LKATQuOIANMpAjJy5S0u iaL9i+loO5UFtG3OBDdbejhH1jS4397UwxouywdZvCaOpsCrbU82SMx26Fw/DQlZIQTB VdJWQSTWCDMo4CkI1TvuW2KAxZhP2L9cMcPNf2y8iAa4c9ikrOSZg9VAV82LS2X4ND7U JI1M6WPo14OQ7sBlrqv01jV9xMuJyoULrRyeP+1IPUztTEjU3xLRdoduJWlTo22LZZso mKYsLFBmdoic9cakNE4HROaxbcYEGYSLo4dXDG1OjunBa/LrW9d5VE5EGPUnlJKJfyrT ND4g== 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=5xSJnIzDiRUkIQZHjlT8e5Lx3/kKLXsoFfrCfP4nmwY=; b=gG8fbeDkEHfikkXkQ4C0DQg1Xn1LxYE1nL6WdqaQ4dLLsXUa4z8r9vYEfiCLKuHa4C m8eV/dBVmzZKSAwL7tig/a74KSwVRVOIRX57cvHZ7DqpIoIYR8bU/302g46gkpEHB+I2 Lmb+C+jpgNi3B49EzZ5LJWNTR9MBGjMBwRpqoYmkXiLCkveVcglzc2t1FV3944HC3NgZ vSsDW6tmEJ0unZ7AaOS/5lxN5u4OnoSbFUfHgFZ6oT8V0Bvpkp0sU+PCj93F2pqHnLOw DiBVjP8BfiMj5+RrTUqmAqXnRa3iTdgpq/KfIyR48UTHeVxCeskt2ocAoI/VR4t08bhM WWYQ== X-Gm-Message-State: APjAAAVnLdYFhsCCehzxd107ebU/rmQH7jbs6kde3EkF2CBEouHQzdDV yfB26GxjHco3WACWFjDKudOxEQEe X-Google-Smtp-Source: APXvYqzUwSwmUbc9tnK2gvwGN/UXd0Dd8bvELyWnrQdUMUq0gyKNCyknwKf7RdGVvjvs90DB7+wL7A== X-Received: by 2002:aca:7215:: with SMTP id p21mr5439425oic.81.1556110526257; Wed, 24 Apr 2019 05:55:26 -0700 (PDT) Received: from mars (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id y129sm8271485oig.27.2019.04.24.05.55.22 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Apr 2019 05:55:23 -0700 (PDT) User-agent: mu4e 1.2.0; emacs 27.0.50 From: Alex Branham To: bug-gnu-emacs@gnu.org Subject: [PATCH] Use lexical binding for ediff Date: Wed, 24 Apr 2019 07:55:20 -0500 Message-ID: <875zr3pnpj.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::231 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.3 (-) 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: -2.3 (--) --=-=-= Content-Type: text/plain Hello - I've attached a patch that converts ediff to use lexical-binding. I've been using it locally for a couple of weeks without noticing any issues, though I'm not a super-heavy ediff user. Thanks, Alex --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Use-lexical-binding-for-ediff.patch >From 32d559ec60813eca85e88f77b89781c3d8b8dc26 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Wed, 10 Apr 2019 20:37:51 -0500 Subject: [PATCH] Use lexical binding for ediff * lisp/vc/ediff-diff.el: * lisp/vc/ediff-help.el: * lisp/vc/ediff-hook.el: * lisp/vc/ediff-init.el: * lisp/vc/ediff-merg.el: * lisp/vc/ediff-vers.el: * lisp/vc/ediff-wind.el: * lisp/vc/ediff-mult.el: Use lexical binding. (ediff-get-directory-files-under-revision): Remove unused jobname argument. (ediff-prepare-meta-buffer): Remove unused startup-hooks (ediff-mark-session-for-hiding): Reindent, remove unused lexical variable. * lisp/vc/ediff-ptch.el: Use lexical binding. (ediff-multi-patch-internal): Remove unused variable startup-hooks. * lisp/vc/ediff.el: Use lexical binding. (ediff-version): Increase. (ediff-date): Remove. (ediff-directories-internal): (ediff-directory-revisions-internal): Account for changes to function arguments. --- lisp/vc/ediff-diff.el | 2 +- lisp/vc/ediff-help.el | 3 ++- lisp/vc/ediff-hook.el | 2 +- lisp/vc/ediff-init.el | 2 +- lisp/vc/ediff-merg.el | 2 +- lisp/vc/ediff-mult.el | 26 ++++++++++++-------------- lisp/vc/ediff-ptch.el | 5 ++--- lisp/vc/ediff-vers.el | 2 +- lisp/vc/ediff-wind.el | 2 +- lisp/vc/ediff.el | 19 +++++++------------ 10 files changed, 29 insertions(+), 36 deletions(-) diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el index a1d27af79d..f6b68bbd7d 100644 --- a/lisp/vc/ediff-diff.el +++ b/lisp/vc/ediff-diff.el @@ -1,4 +1,4 @@ -;;; ediff-diff.el --- diff-related utilities +;;; ediff-diff.el --- diff-related utilities -*- lexical-binding: t; -*- ;; Copyright (C) 1994-2019 Free Software Foundation, Inc. diff --git a/lisp/vc/ediff-help.el b/lisp/vc/ediff-help.el index 11c8b35bca..74a4068a7f 100644 --- a/lisp/vc/ediff-help.el +++ b/lisp/vc/ediff-help.el @@ -1,4 +1,4 @@ -;;; ediff-help.el --- Code related to the contents of Ediff help buffers +;;; ediff-help.el --- Code related to the contents of Ediff help buffers -*- lexical-binding: t; -*- ;; Copyright (C) 1996-2019 Free Software Foundation, Inc. @@ -30,6 +30,7 @@ ;; end pacifier (require 'ediff-init) +(defvar ediff-multiframe) ;; Help messages diff --git a/lisp/vc/ediff-hook.el b/lisp/vc/ediff-hook.el index 84122150ad..6ece7af5e6 100644 --- a/lisp/vc/ediff-hook.el +++ b/lisp/vc/ediff-hook.el @@ -1,4 +1,4 @@ -;;; ediff-hook.el --- setup for Ediff's menus and autoloads +;;; ediff-hook.el --- setup for Ediff's menus and autoloads -*- lexical-binding: t; -*- ;; Copyright (C) 1995-2019 Free Software Foundation, Inc. diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el index a74d6a8b4d..41871d4b7c 100644 --- a/lisp/vc/ediff-init.el +++ b/lisp/vc/ediff-init.el @@ -1,4 +1,4 @@ -;;; ediff-init.el --- Macros, variables, and defsubsts used by Ediff +;;; ediff-init.el --- Macros, variables, and defsubsts used by Ediff -*- lexical-binding: t; -*- ;; Copyright (C) 1994-2019 Free Software Foundation, Inc. diff --git a/lisp/vc/ediff-merg.el b/lisp/vc/ediff-merg.el index a511f4488f..e08d899bd0 100644 --- a/lisp/vc/ediff-merg.el +++ b/lisp/vc/ediff-merg.el @@ -1,4 +1,4 @@ -;;; ediff-merg.el --- merging utilities +;;; ediff-merg.el --- merging utilities -*- lexical-binding: t; -*- ;; Copyright (C) 1994-2019 Free Software Foundation, Inc. diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el index 21f89168b3..39ed275897 100644 --- a/lisp/vc/ediff-mult.el +++ b/lisp/vc/ediff-mult.el @@ -1,4 +1,4 @@ -;;; ediff-mult.el --- support for multi-file/multi-buffer processing in Ediff +;;; ediff-mult.el --- support for multi-file/multi-buffer processing in Ediff -*- lexical-binding: t; -*- ;; Copyright (C) 1995-2019 Free Software Foundation, Inc. @@ -714,9 +714,8 @@ behavior." ;; we may visit them recursively. DIR1 is the directory to inspect. ;; MERGE-AUTOSTORE-DIR is the directory where to auto-store the results of ;; merges. Can be nil. -(defun ediff-get-directory-files-under-revision (jobname - regexp dir1 - &optional merge-autostore-dir) +(defun ediff-get-directory-files-under-revision (regexp dir1 + &optional merge-autostore-dir) (let (lis1 elt common auxdir1) (setq auxdir1 (file-name-as-directory dir1) lis1 (directory-files auxdir1 nil regexp)) @@ -760,7 +759,7 @@ behavior." auxdir1 nil nil merge-autostore-dir nil) (mapcar (lambda (elt) (ediff-make-new-meta-list-element - (expand-file-name (concat auxdir1 elt)) nil nil)) + (expand-file-name (concat auxdir1 elt)) nil nil)) common)) )) @@ -798,8 +797,8 @@ behavior." ;; Prepare meta-buffer in accordance with the argument-function and ;; redraw-function. Must return the created meta-buffer. (defun ediff-prepare-meta-buffer (action-func meta-list - meta-buffer-name redraw-function - jobname &optional startup-hooks) + meta-buffer-name redraw-function + jobname) (let* ((meta-buffer-name (ediff-unique-buffer-name meta-buffer-name "*")) (meta-buffer (get-buffer-create meta-buffer-name))) @@ -869,27 +868,27 @@ behavior." (define-key ediff-meta-buffer-map [menu-bar ediff-meta-mode ediff-hide-marked-sessions] '(menu-item "Hide marked" ediff-hide-marked-sessions - :help "Hide marked sessions. With prefix arg, unhide")) + :help "Hide marked sessions. With prefix arg, unhide")) (define-key ediff-meta-buffer-map [menu-bar ediff-meta-mode ediff-mark-for-hiding-at-pos] '(menu-item "Mark for hiding" ediff-mark-for-hiding-at-pos - :help "Mark session for hiding. With prefix arg, unmark")) + :help "Mark session for hiding. With prefix arg, unmark")) (define-key ediff-meta-buffer-map [menu-bar ediff-meta-mode ediff-mark-for-operation-at-pos] '(menu-item "Mark for group operation" ediff-mark-for-operation-at-pos - :help "Mark session for a group operation. With prefix arg, unmark")) + :help "Mark session for a group operation. With prefix arg, unmark")) (define-key ediff-meta-buffer-map [menu-bar ediff-meta-mode ediff-unmark-all-for-hiding] '(menu-item "Unmark all for hiding" ediff-unmark-all-for-hiding - :help "Unmark all sessions marked for hiding")) + :help "Unmark all sessions marked for hiding")) (define-key ediff-meta-buffer-map [menu-bar ediff-meta-mode ediff-unmark-all-for-operation] '(menu-item "Unmark all for group operation" ediff-unmark-all-for-operation - :help "Unmark all sessions marked for operation")) + :help "Unmark all sessions marked for operation")) (cond ((ediff-collect-diffs-metajob jobname) (define-key ediff-meta-buffer-map @@ -1583,8 +1582,7 @@ Useful commands: ;; Returns whether session was marked or unmarked (defun ediff-mark-session-for-hiding (info unmark) - (let ((session-buf (ediff-get-session-buffer info)) - ignore) + (let (ignore) (cond ((eq unmark 'mark) (setq unmark nil)) ((eq (ediff-get-session-status info) ?H) (setq unmark t)) (unmark ; says unmark, but the marker is different from H diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el index 4178b5a8c0..21a4d575f4 100644 --- a/lisp/vc/ediff-ptch.el +++ b/lisp/vc/ediff-ptch.el @@ -1,4 +1,4 @@ -;;; ediff-ptch.el --- Ediff's patch support +;;; ediff-ptch.el --- Ediff's patch support -*- lexical-binding: t; -*- ;; Copyright (C) 1996-2019 Free Software Foundation, Inc. @@ -842,8 +842,7 @@ you can still examine the changes via M-x ediff-files" ediff-patch-map)) "*Ediff Session Group Panel" 'ediff-redraw-directory-group-buffer - 'ediff-multifile-patch - startup-hooks)) + 'ediff-multifile-patch)) (ediff-show-meta-buffer meta-buf) )) diff --git a/lisp/vc/ediff-vers.el b/lisp/vc/ediff-vers.el index 664ae5ae94..049fdc880b 100644 --- a/lisp/vc/ediff-vers.el +++ b/lisp/vc/ediff-vers.el @@ -1,4 +1,4 @@ -;;; ediff-vers.el --- version control interface to Ediff +;;; ediff-vers.el --- version control interface to Ediff -*- lexical-binding: t; -*- ;; Copyright (C) 1995-1997, 2001-2019 Free Software Foundation, Inc. diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el index 492ddd3417..559a20b023 100644 --- a/lisp/vc/ediff-wind.el +++ b/lisp/vc/ediff-wind.el @@ -1,4 +1,4 @@ -;;; ediff-wind.el --- window manipulation utilities +;;; ediff-wind.el --- window manipulation utilities -*- lexical-binding: t; -*- ;; Copyright (C) 1994-1997, 2000-2019 Free Software Foundation, Inc. diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index 0dfbe2ea66..bfb09246a1 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el @@ -1,21 +1,18 @@ -;;; ediff.el --- a comprehensive visual interface to diff & patch +;;; ediff.el --- a comprehensive visual interface to diff & patch -*- lexical-binding: t; -*- ;; Copyright (C) 1994-2019 Free Software Foundation, Inc. ;; Author: Michael Kifer ;; Created: February 2, 1994 ;; Keywords: comparing, merging, patching, vc, tools, unix -;; Version: 2.81.4 +;; Version: 2.81.6 +(defconst ediff-version "2.81.6" "The current version of Ediff") ;; Yoni Rabkin contacted the maintainer of this ;; file on 20/3/2008, and the maintainer agreed that when a bug is ;; filed in the Emacs bug reporting system against this file, a copy ;; of the bug report be sent to the maintainer's email address. -(defconst ediff-version "2.81.5" "The current version of Ediff") -(defconst ediff-date "July 4, 2013" "Date of last update") - - ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify @@ -862,8 +859,7 @@ MERGE-AUTOSTORE-DIR is the directory in which to store merged files." (car dir-diff-struct) "*Ediff Session Group Panel" 'ediff-redraw-directory-group-buffer - jobname - startup-hooks)) + jobname)) (ediff-show-meta-buffer meta-buf) )) @@ -899,7 +895,7 @@ MERGE-AUTOSTORE-DIR is the directory in which to store merged files." (setq file-list (ediff-get-directory-files-under-revision - jobname regexp dir1 merge-autostore-dir)) + regexp dir1 merge-autostore-dir)) (setq startup-hooks ;; this sets various vars in the meta buffer inside ;; ediff-prepare-meta-buffer @@ -912,8 +908,7 @@ MERGE-AUTOSTORE-DIR is the directory in which to store merged files." file-list "*Ediff Session Group Panel" 'ediff-redraw-directory-group-buffer - jobname - startup-hooks)) + jobname)) (ediff-show-meta-buffer meta-buf) )) @@ -1546,7 +1541,7 @@ When called interactively, displays the version." (interactive-p) (called-interactively-p 'interactive)) (message "%s" (ediff-version)) - (format "Ediff %s of %s" ediff-version ediff-date))) + (format "Ediff %s" ediff-version))) ;; info is run first, and will autoload info.el. (declare-function Info-goto-node "info" (nodename &optional fork strict-case)) -- 2.21.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 03 04:53:31 2019 Received: (at 35413) by debbugs.gnu.org; 3 May 2019 08:53:31 +0000 Received: from localhost ([127.0.0.1]:47672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMTwh-0001xs-4H for submit@debbugs.gnu.org; Fri, 03 May 2019 04:53:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMTwf-0001xg-53 for 35413@debbugs.gnu.org; Fri, 03 May 2019 04:53:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMTwZ-0008Qw-Vh; Fri, 03 May 2019 04:53:24 -0400 Received: from [176.228.60.248] (port=2994 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hMTwZ-0003eG-EH; Fri, 03 May 2019 04:53:23 -0400 Date: Fri, 03 May 2019 11:53:05 +0300 Message-Id: <834l6bor66.fsf@gnu.org> From: Eli Zaretskii To: Alex Branham In-reply-to: <875zr3pnpj.fsf@gmail.com> (message from Alex Branham on Wed, 24 Apr 2019 07:55:20 -0500) Subject: Re: bug#35413: [PATCH] Use lexical binding for ediff References: <875zr3pnpj.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35413 Cc: 35413@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: -3.3 (---) > From: Alex Branham > Date: Wed, 24 Apr 2019 07:55:20 -0500 Sorry for a long delay in responding. > I've attached a patch that converts ediff to use lexical-binding. I've > been using it locally for a couple of weeks without noticing any issues, > though I'm not a super-heavy ediff user. I assume you ran all ediff tests we have, but did you also try commands outside the ediff-* group, to make sure they still work? I think VC has some commands, and there's also emerge. I have a couple of questions regarding the changes: > (ediff-prepare-meta-buffer): Remove unused startup-hooks > (ediff-multi-patch-internal): Remove unused variable startup-hooks. startup-hooks are used by emerge and maybe by users. Why remove it? > (ediff-date): Remove. Why? > @@ -714,9 +714,8 @@ behavior." > ;; we may visit them recursively. DIR1 is the directory to inspect. > ;; MERGE-AUTOSTORE-DIR is the directory where to auto-store the results of > ;; merges. Can be nil. > -(defun ediff-get-directory-files-under-revision (jobname > - regexp dir1 > - &optional merge-autostore-dir) > +(defun ediff-get-directory-files-under-revision (regexp dir1 > + &optional merge-autostore-dir) This and other hunks change signatures of public functions, which is always a problem. Is this a must? Can't we leave the signatures alone? If not, what are the problems that necessitate that? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue May 14 08:31:34 2019 Received: (at 35413) by debbugs.gnu.org; 14 May 2019 12:31:35 +0000 Received: from localhost ([127.0.0.1]:47622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQWak-0005FO-9C for submit@debbugs.gnu.org; Tue, 14 May 2019 08:31:34 -0400 Received: from mail-oi1-f181.google.com ([209.85.167.181]:33457) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQWai-0005F7-6J for 35413@debbugs.gnu.org; Tue, 14 May 2019 08:31:32 -0400 Received: by mail-oi1-f181.google.com with SMTP id m204so11973262oib.0 for <35413@debbugs.gnu.org>; Tue, 14 May 2019 05:31:32 -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=mxCLsel7drqUdUBKp9Mq3eJlR+2E9XRKrq5XrAUenbY=; b=C8uInOGYhkJEXd/22q3eg1xqpkqrcaC/XrHlxl3/VhZqdXlx0SXJ/8qWMkAWdNcVP1 O849yocfuPncUrRUtQ9tInjiq24TTcSpnMO6mxK4MSH4cL16po/vcIDw/wMEiWDY5szw 5dXQOBo5tyZa7yhAL5YrmA4d2NBoTugmbSqDMdIASJqzy7SnF80IAVQBryO7IANTiU7t jmcsb0iva4KHF0C28n4E6GllD3R4zRDmUp9OO6wb/mCEkUAv6QmONDhH31J36s7xF2xc x8/KEh5aepllLmJUjNSIjX8ZFyaNJDivPjOyrpda++NiJQ2oiQ3K3K8KKHCgjvg+mhyg DIBg== 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=mxCLsel7drqUdUBKp9Mq3eJlR+2E9XRKrq5XrAUenbY=; b=PyzMMwaidiMeQ0UWplOA85qL3PqbQ9d++XWiz2SwsdGyLeYQ47Jnjqx9K1awyoMd+3 ToirYLQS+gR15AF4o4x6+viEgsfo4zzOY+0lRF+hc+qGBQMB2x4KP2gTqcwQazYL4hkP lYoBoJgM1wKEXfcNpqOGvprIjjrtCADWl19ejWvfM5Bmoozdugegynbn0yEKjTQ80Ose tnJN8Ewc+D7JZQYXGrXGXIdxoioTJYBkklSx/4IFqBlHSUWKe5B5pDlf/prYvBEfBvoZ WtUiCegMkR2kS5moqTZ5YtAtjKxQVmgCgYoXZKRKgu6vNgK4V8Sw2TPiqC2sca3XYuf/ gWFg== X-Gm-Message-State: APjAAAUUTHe1uBJoTR3lSXSmA1XZalmZ4JWV5TQgz+QLRCjgNwSiurpl VUMT0Wqn7I9OP17jJtZdjEW4z0ho X-Google-Smtp-Source: APXvYqxuDtfyAaq6FQ8e/0R0r2DgqT5JKwPaXUvxZzdlxPFi6bqf4/uw6dLgbMAgU9Khn61rLggmIg== X-Received: by 2002:aca:ddc2:: with SMTP id u185mr2743037oig.46.1557837085978; Tue, 14 May 2019 05:31:25 -0700 (PDT) Received: from mars (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id f5sm7338822oih.39.2019.05.14.05.31.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 May 2019 05:31:24 -0700 (PDT) References: <875zr3pnpj.fsf@gmail.com> <834l6bor66.fsf@gnu.org> User-agent: mu4e 1.2.0; emacs 27.0.50 From: Alex Branham To: Eli Zaretskii Subject: Re: bug#35413: [PATCH] Use lexical binding for ediff In-reply-to: <834l6bor66.fsf@gnu.org> Date: Tue, 14 May 2019 07:31:23 -0500 Message-ID: <87bm058bfo.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35413 Cc: 35413@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 Fri 03 May 2019 at 03:53, Eli Zaretskii wrote: >> From: Alex Branham >> Date: Wed, 24 Apr 2019 07:55:20 -0500 > > Sorry for a long delay in responding. And sorry for the also-delayed followup :-) >> I've attached a patch that converts ediff to use lexical-binding. I've >> been using it locally for a couple of weeks without noticing any issues, >> though I'm not a super-heavy ediff user. > > I assume you ran all ediff tests we have, but did you also try > commands outside the ediff-* group, to make sure they still work? I > think VC has some commands, and there's also emerge. I checked out the VC commands. I'm not very familiar with smerge, but it at least appears to function correctly from what I can tell. "make check" passes too. > I have a couple of questions regarding the changes: > >> (ediff-prepare-meta-buffer): Remove unused startup-hooks >> (ediff-multi-patch-internal): Remove unused variable startup-hooks. > > startup-hooks are used by emerge and maybe by users. Why remove it? The attached patch keeps it now. >> (ediff-date): Remove. > > Why? It doesn't seem useful and people forget to modify it when they make changes to the file. >> @@ -714,9 +714,8 @@ behavior." >> ;; we may visit them recursively. DIR1 is the directory to inspect. >> ;; MERGE-AUTOSTORE-DIR is the directory where to auto-store the results of >> ;; merges. Can be nil. >> -(defun ediff-get-directory-files-under-revision (jobname >> - regexp dir1 >> - &optional merge-autostore-dir) >> +(defun ediff-get-directory-files-under-revision (regexp dir1 >> + &optional merge-autostore-dir) > > This and other hunks change signatures of public functions, which is > always a problem. Is this a must? Can't we leave the signatures > alone? If not, what are the problems that necessitate that? Kept in the attached. Thanks, Alex --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Use-lexical-binding-for-ediff.patch >From c7138250126c1ada210ed4e89df61c041a372484 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Thu, 9 May 2019 07:47:26 -0500 Subject: [PATCH] Use lexical binding for ediff * lisp/vc/ediff-diff.el: * lisp/vc/ediff-help.el: * lisp/vc/ediff-hook.el: * lisp/vc/ediff-init.el: * lisp/vc/ediff-merg.el: * lisp/vc/ediff-vers.el: * lisp/vc/ediff-wind.el: * lisp/vc/ediff-mult.el: * lisp/vc/ediff-ptch.el: * lisp/vc/ediff.el: Use lexical binding. (ediff-version): Increase. (ediff-date): Remove. --- lisp/vc/ediff-diff.el | 2 +- lisp/vc/ediff-help.el | 3 ++- lisp/vc/ediff-hook.el | 2 +- lisp/vc/ediff-init.el | 2 +- lisp/vc/ediff-merg.el | 2 +- lisp/vc/ediff-mult.el | 13 ++++++------- lisp/vc/ediff-ptch.el | 2 +- lisp/vc/ediff-vers.el | 2 +- lisp/vc/ediff-wind.el | 2 +- lisp/vc/ediff.el | 11 ++++------- 10 files changed, 19 insertions(+), 22 deletions(-) diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el index a1d27af79d..f6b68bbd7d 100644 --- a/lisp/vc/ediff-diff.el +++ b/lisp/vc/ediff-diff.el @@ -1,4 +1,4 @@ -;;; ediff-diff.el --- diff-related utilities +;;; ediff-diff.el --- diff-related utilities -*- lexical-binding: t; -*- ;; Copyright (C) 1994-2019 Free Software Foundation, Inc. diff --git a/lisp/vc/ediff-help.el b/lisp/vc/ediff-help.el index 11c8b35bca..74a4068a7f 100644 --- a/lisp/vc/ediff-help.el +++ b/lisp/vc/ediff-help.el @@ -1,4 +1,4 @@ -;;; ediff-help.el --- Code related to the contents of Ediff help buffers +;;; ediff-help.el --- Code related to the contents of Ediff help buffers -*- lexical-binding: t; -*- ;; Copyright (C) 1996-2019 Free Software Foundation, Inc. @@ -30,6 +30,7 @@ ediff-multiframe ;; end pacifier (require 'ediff-init) +(defvar ediff-multiframe) ;; Help messages diff --git a/lisp/vc/ediff-hook.el b/lisp/vc/ediff-hook.el index 84122150ad..6ece7af5e6 100644 --- a/lisp/vc/ediff-hook.el +++ b/lisp/vc/ediff-hook.el @@ -1,4 +1,4 @@ -;;; ediff-hook.el --- setup for Ediff's menus and autoloads +;;; ediff-hook.el --- setup for Ediff's menus and autoloads -*- lexical-binding: t; -*- ;; Copyright (C) 1995-2019 Free Software Foundation, Inc. diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el index a74d6a8b4d..41871d4b7c 100644 --- a/lisp/vc/ediff-init.el +++ b/lisp/vc/ediff-init.el @@ -1,4 +1,4 @@ -;;; ediff-init.el --- Macros, variables, and defsubsts used by Ediff +;;; ediff-init.el --- Macros, variables, and defsubsts used by Ediff -*- lexical-binding: t; -*- ;; Copyright (C) 1994-2019 Free Software Foundation, Inc. diff --git a/lisp/vc/ediff-merg.el b/lisp/vc/ediff-merg.el index a511f4488f..e08d899bd0 100644 --- a/lisp/vc/ediff-merg.el +++ b/lisp/vc/ediff-merg.el @@ -1,4 +1,4 @@ -;;; ediff-merg.el --- merging utilities +;;; ediff-merg.el --- merging utilities -*- lexical-binding: t; -*- ;; Copyright (C) 1994-2019 Free Software Foundation, Inc. diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el index 21f89168b3..8ac8eff986 100644 --- a/lisp/vc/ediff-mult.el +++ b/lisp/vc/ediff-mult.el @@ -1,4 +1,4 @@ -;;; ediff-mult.el --- support for multi-file/multi-buffer processing in Ediff +;;; ediff-mult.el --- support for multi-file/multi-buffer processing in Ediff -*- lexical-binding: t; -*- ;; Copyright (C) 1995-2019 Free Software Foundation, Inc. @@ -714,7 +714,7 @@ ediff-intersect-directories ;; we may visit them recursively. DIR1 is the directory to inspect. ;; MERGE-AUTOSTORE-DIR is the directory where to auto-store the results of ;; merges. Can be nil. -(defun ediff-get-directory-files-under-revision (jobname +(defun ediff-get-directory-files-under-revision (_jobname regexp dir1 &optional merge-autostore-dir) (let (lis1 elt common auxdir1) @@ -760,7 +760,7 @@ ediff-get-directory-files-under-revision auxdir1 nil nil merge-autostore-dir nil) (mapcar (lambda (elt) (ediff-make-new-meta-list-element - (expand-file-name (concat auxdir1 elt)) nil nil)) + (expand-file-name (concat auxdir1 elt)) nil nil)) common)) )) @@ -798,8 +798,8 @@ ediff-get-directory-files-under-revision ;; Prepare meta-buffer in accordance with the argument-function and ;; redraw-function. Must return the created meta-buffer. (defun ediff-prepare-meta-buffer (action-func meta-list - meta-buffer-name redraw-function - jobname &optional startup-hooks) + meta-buffer-name redraw-function + jobname &optional _startup-hooks) (let* ((meta-buffer-name (ediff-unique-buffer-name meta-buffer-name "*")) (meta-buffer (get-buffer-create meta-buffer-name))) @@ -1583,8 +1583,7 @@ ediff-mark-for-hiding-at-pos ;; Returns whether session was marked or unmarked (defun ediff-mark-session-for-hiding (info unmark) - (let ((session-buf (ediff-get-session-buffer info)) - ignore) + (let (ignore) (cond ((eq unmark 'mark) (setq unmark nil)) ((eq (ediff-get-session-status info) ?H) (setq unmark t)) (unmark ; says unmark, but the marker is different from H diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el index 70c03b5c01..21e1e2ee16 100644 --- a/lisp/vc/ediff-ptch.el +++ b/lisp/vc/ediff-ptch.el @@ -1,4 +1,4 @@ -;;; ediff-ptch.el --- Ediff's patch support +;;; ediff-ptch.el --- Ediff's patch support -*- lexical-binding: t; -*- ;; Copyright (C) 1996-2019 Free Software Foundation, Inc. diff --git a/lisp/vc/ediff-vers.el b/lisp/vc/ediff-vers.el index 664ae5ae94..049fdc880b 100644 --- a/lisp/vc/ediff-vers.el +++ b/lisp/vc/ediff-vers.el @@ -1,4 +1,4 @@ -;;; ediff-vers.el --- version control interface to Ediff +;;; ediff-vers.el --- version control interface to Ediff -*- lexical-binding: t; -*- ;; Copyright (C) 1995-1997, 2001-2019 Free Software Foundation, Inc. diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el index 492ddd3417..559a20b023 100644 --- a/lisp/vc/ediff-wind.el +++ b/lisp/vc/ediff-wind.el @@ -1,4 +1,4 @@ -;;; ediff-wind.el --- window manipulation utilities +;;; ediff-wind.el --- window manipulation utilities -*- lexical-binding: t; -*- ;; Copyright (C) 1994-1997, 2000-2019 Free Software Foundation, Inc. diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index 0dfbe2ea66..e13c7b93a9 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el @@ -1,21 +1,18 @@ -;;; ediff.el --- a comprehensive visual interface to diff & patch +;;; ediff.el --- a comprehensive visual interface to diff & patch -*- lexical-binding: t; -*- ;; Copyright (C) 1994-2019 Free Software Foundation, Inc. ;; Author: Michael Kifer ;; Created: February 2, 1994 ;; Keywords: comparing, merging, patching, vc, tools, unix -;; Version: 2.81.4 +;; Version: 2.81.6 +(defconst ediff-version "2.81.6" "The current version of Ediff") ;; Yoni Rabkin contacted the maintainer of this ;; file on 20/3/2008, and the maintainer agreed that when a bug is ;; filed in the Emacs bug reporting system against this file, a copy ;; of the bug report be sent to the maintainer's email address. -(defconst ediff-version "2.81.5" "The current version of Ediff") -(defconst ediff-date "July 4, 2013" "Date of last update") - - ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify @@ -1546,7 +1543,7 @@ ediff-version (interactive-p) (called-interactively-p 'interactive)) (message "%s" (ediff-version)) - (format "Ediff %s of %s" ediff-version ediff-date))) + (format "Ediff %s" ediff-version))) ;; info is run first, and will autoload info.el. (declare-function Info-goto-node "info" (nodename &optional fork strict-case)) -- 2.21.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 07 10:25:34 2019 Received: (at 35413) by debbugs.gnu.org; 7 Jun 2019 14:25:34 +0000 Received: from localhost ([127.0.0.1]:52220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hZFoE-0005eX-2k for submit@debbugs.gnu.org; Fri, 07 Jun 2019 10:25:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hZFoC-0005eL-82 for 35413@debbugs.gnu.org; Fri, 07 Jun 2019 10:25:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48739) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hZFo7-0006Ld-1u; Fri, 07 Jun 2019 10:25:27 -0400 Received: from [176.228.60.248] (port=2868 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hZFnq-000452-7J; Fri, 07 Jun 2019 10:25:14 -0400 Date: Fri, 07 Jun 2019 17:24:53 +0300 Message-Id: <831s05qxqi.fsf@gnu.org> From: Eli Zaretskii To: Alex Branham In-reply-to: <87bm058bfo.fsf@gmail.com> (message from Alex Branham on Tue, 14 May 2019 07:31:23 -0500) Subject: Re: bug#35413: [PATCH] Use lexical binding for ediff References: <875zr3pnpj.fsf@gmail.com> <834l6bor66.fsf@gnu.org> <87bm058bfo.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35413 Cc: 35413@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: -3.3 (---) > From: Alex Branham > Cc: 35413@debbugs.gnu.org > Date: Tue, 14 May 2019 07:31:23 -0500 > > On Fri 03 May 2019 at 03:53, Eli Zaretskii wrote: > > >> From: Alex Branham > >> Date: Wed, 24 Apr 2019 07:55:20 -0500 > > > > Sorry for a long delay in responding. > > And sorry for the also-delayed followup :-) Sorry for another long delay, this version is fine with me. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 09 11:02:21 2019 Received: (at 35413-done) by debbugs.gnu.org; 9 Jun 2019 15:02:21 +0000 Received: from localhost ([127.0.0.1]:55196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hZzKu-00011u-Tb for submit@debbugs.gnu.org; Sun, 09 Jun 2019 11:02:21 -0400 Received: from mail-oi1-f174.google.com ([209.85.167.174]:41859) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hZzKs-00011g-LJ for 35413-done@debbugs.gnu.org; Sun, 09 Jun 2019 11:02:19 -0400 Received: by mail-oi1-f174.google.com with SMTP id g7so1372186oia.8 for <35413-done@debbugs.gnu.org>; Sun, 09 Jun 2019 08:02:18 -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=YFGlriwHGe/GVkvT/cKakNkdVVznfmEhAOATjLiIdrs=; b=FMks5KADFcCtBCFn4uTHl2NxBc5cZ/GcMpPouoFz/n6pxrJiWqVsOI58lRzMqBd9xZ wBXZQSuzvGr0VCWFmladDgoD5lQWF6w8Pxy2fMQ6ciahcQMuOeU8xIYOQffi58JyS4Go pN3l2zLlPvWhblFX9ILKTxF0KKjwqVsTPuUCbgzBorfB1p1zCGb82j7JhXa9ecalVxgN 3g5pyqPxAkNn5Vgf3ZL38I/46bDxQJGXe4/I9gUVPy9QdGDb6JTrHb9edWYGFja/h4J1 RCJcQ/k+qFUDISMNba/jK4kaR+4abMEdVCfrLk3HtDZlAMfe7kOXOjV/CXZIFzROyBWZ hOAg== 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=YFGlriwHGe/GVkvT/cKakNkdVVznfmEhAOATjLiIdrs=; b=uhxrm15V6KtHOm/p4aeAC//ppTxqkN2zdgn3bQl6MZdssXUzHwFgpTMUONFPQ3TCv+ cwCqdWqWmSbZy+FcLZTIQ/a18r8E39Rs9Q8k+Huj5CJsQBXW2mzI0bmRqxlHeAl/qOKI IdndtyVBbjJKjQvkbr93nxxdpTpfNoc/FszypDczdPqQ8mgeA8hLP5y0j07HPAk3RBv5 Ciu5MIdj/+KyfYmtpnWmGo8Rk2jw/z0YDhG1mhkHSB7dPzPGyebJLL8FeHIFloNk8m0d To5gViNFEOEPwEq/LpphmersLMWZH3VkjJY7fuyMImebiU0g6peM3k4R+3KszkwIskvG YHgg== X-Gm-Message-State: APjAAAV8HewWrMTm7qYIB/0juWCHBYFWlRQvCtgEw6fT7eq/oTulqZ62 MpqpONQfPZUZk5HAotG/zsavGeiG X-Google-Smtp-Source: APXvYqxEZydDrE90k4EAPJwRR5NaU3IJdzXScB278MGoQk5WN19+7Y9crbCa1gi+Rp2XjdlmrYAAjQ== X-Received: by 2002:aca:5d45:: with SMTP id r66mr8987938oib.143.1560092532336; Sun, 09 Jun 2019 08:02:12 -0700 (PDT) Received: from mars (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id n3sm2908039oib.49.2019.06.09.08.02.10 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 09 Jun 2019 08:02:11 -0700 (PDT) References: <875zr3pnpj.fsf@gmail.com> <834l6bor66.fsf@gnu.org> <87bm058bfo.fsf@gmail.com> <831s05qxqi.fsf@gnu.org> User-agent: mu4e 1.2.0; emacs 27.0.50 From: Alex Branham To: Eli Zaretskii Subject: Re: bug#35413: [PATCH] Use lexical binding for ediff In-reply-to: <831s05qxqi.fsf@gnu.org> Date: Sun, 09 Jun 2019 10:02:08 -0500 Message-ID: <87zhmq94zz.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35413-done Cc: 35413-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 (-) On Fri 07 Jun 2019 at 09:24, Eli Zaretskii wrote: > Sorry for another long delay, this version is fine with me. Great, pushed as 963d4e24263b0ff2add1a223f00387ca53d0658f to appear in Emacs 27. Thanks, Alex From unknown Sun Jun 22 22:48:00 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 08 Jul 2019 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator