From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Suspicious code in align.el Date: Fri, 1 Jan 2016 19:47:34 +0000 Message-ID: Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1451677672 7584 80.91.229.3 (1 Jan 2016 19:47:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Jan 2016 19:47:52 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 01 20:47:52 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aF5fz-0003RV-MI for ged-emacs-devel@m.gmane.org; Fri, 01 Jan 2016 20:47:52 +0100 Original-Received: from localhost ([::1]:36591 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aF5fx-0001sy-5X for ged-emacs-devel@m.gmane.org; Fri, 01 Jan 2016 14:47:49 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aF5fm-0001st-P6 for emacs-devel@gnu.org; Fri, 01 Jan 2016 14:47:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aF5fk-0005PR-UW for emacs-devel@gnu.org; Fri, 01 Jan 2016 14:47:38 -0500 Original-Received: from mail-yk0-x234.google.com ([2607:f8b0:4002:c07::234]:35955) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aF5fk-0005Oy-OJ for emacs-devel@gnu.org; Fri, 01 Jan 2016 14:47:36 -0500 Original-Received: by mail-yk0-x234.google.com with SMTP id v14so108841165ykd.3 for ; Fri, 01 Jan 2016 11:47:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:date:message-id:subject:from:to :content-type; bh=VL23CbZ2wr4QKSgFwe9eqAgFsJsozW4ZwHVwWz5rWKg=; b=lueTgMbXBfzIWNyG/6kqhoifQo1NqCNtbbVsU5GJRFYKXSSEVQ7XKGckZ6kkLphhmB +y9FWEMpXHVi1OUwS9dKtsOIiUvZpm0J2KTQvvn0Pe74xQJhXyPHNX2zbRhcMpedMKBd M+owihFUB4uJRmsf8q8QG9DGdPe6dc9VVrjncHQvrBCttHmdhxxvh3BGNi6W17XQa0lf c9bGbEDTvJEtIe6Kx6w4iKZguwazdTqLLVAQZsJmhhGTuX9ItYbBRywZ7KVI32CcsB/F A9NhQ2gT3GZOs6i7oCFampu1JqO19FjBeohRTqU0N3LqcTHkI0BDLuabU1Z4VsIeTT1A K7tg== X-Received: by 10.129.146.150 with SMTP id j144mr33180842ywg.19.1451677654863; Fri, 01 Jan 2016 11:47:34 -0800 (PST) Original-Received: by 10.129.87.130 with HTTP; Fri, 1 Jan 2016 11:47:34 -0800 (PST) X-Google-Sender-Auth: 6UEYLLC4TTxZsL9jJfiJ7GwhtMs X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4002:c07::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:197318 Archived-At: In line 890 of this file, there's a call to align-regexp that looks like this: (align-region beg end (or exclude-rules align-mode-exclude-rules-list align-exclude-rules-list) nil separator (function (lambda (b e mode) (when (and mode (listp mode)) (setq sec-first (min sec-first b) sec-last (max sec-last e)))))) Note how the separator here is passed as 5th argument, while the docstring of `align-region' documents it as the 3th arg. Furthermore, the exclude-rules are passed as 3rd arg, but they're documented as 5th. Is this correct? Apparently this was written 15 years ago, so this means I'm either missing something or this code branch is never reached. Cheers, Artur