From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Oleh Krehel Newsgroups: gmane.emacs.devel Subject: 7 logical-xor implementations in source tree Date: Mon, 22 Jul 2019 20:48:06 +0200 Message-ID: <87tvbd9a8p.fsf@oremacs.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="36691"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: mu4e 1.3.3; emacs 26.2 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 22 20:48:14 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hpdM5-0009RC-Tv for ged-emacs-devel@m.gmane.org; Mon, 22 Jul 2019 20:48:14 +0200 Original-Received: from localhost ([::1]:36764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpdM4-0002Cc-Ns for ged-emacs-devel@m.gmane.org; Mon, 22 Jul 2019 14:48:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47602) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpdM1-0002Bm-Qq for emacs-devel@gnu.org; Mon, 22 Jul 2019 14:48:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hpdM0-000167-Tw for emacs-devel@gnu.org; Mon, 22 Jul 2019 14:48:09 -0400 Original-Received: from mail-ed1-f53.google.com ([209.85.208.53]:37502) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hpdM0-00015M-Mp for emacs-devel@gnu.org; Mon, 22 Jul 2019 14:48:08 -0400 Original-Received: by mail-ed1-f53.google.com with SMTP id w13so41531435eds.4 for ; Mon, 22 Jul 2019 11:48:08 -0700 (PDT) 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=58zduIOaGvVYW3G52HZfKPtntGOKUCGsLqWnBakWAZI=; b=l4nZ3ANFDm9MAGvyihfBNz7C5eNWn3T037lnnv77rdTkglCIVmkKz64nfzyyp4qJyd yB8HeRDK7IoJcgsjacgWVQu5vezqM2kOf3/L4bnNczKq/LgrrF/a/VlZszOYWxlUpEHP adHI7eqTKEks0raHlnIV7LR4PSVvfIXriZwPsfNyl441jK9F/DhvCBDiv7cOa2/rQeo5 GcSWTlxq7vC05sPmsJEiIOD74bqYWsuD4JLMpcPvEAqY+DlUBUIPAYnWuhN0ZDuRQkya 4CdSUMZcrxnzEdUGWHfvmS8oUsj59c6d2R1Lj3WRRz0yrzR67qf1YEGb2FNNGqDvE4NI 3bwQ== X-Gm-Message-State: APjAAAXrSU9GULtAMHqobWgTN865Tio1+W8Z5KcM2WilCMxA+/1TA2mW u7BIse6Q5LqCRuRwftcRXA2c+fhv+U4= X-Google-Smtp-Source: APXvYqyUMh1/LNL2eIKj/EA2HH9UpiGMBQz5CpE9Hmut8tKU4hnKSnCetziLuiZXtKNoxRzjooCfCg== X-Received: by 2002:a50:9468:: with SMTP id q37mr61343350eda.163.1563821287620; Mon, 22 Jul 2019 11:48:07 -0700 (PDT) Original-Received: from localhost ([2a02:a213:2701:e100:e17c:8f7d:bab2:94ae]) by smtp.gmail.com with ESMTPSA id o22sm11416225edc.37.2019.07.22.11.48.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2019 11:48:07 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.208.53 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.org gmane.emacs.devel:238802 Archived-At: --=-=-= Content-Type: text/plain; format=flowed Hi all, I found myself in need of a logical-xor function. There's `xor' defined in array.el. But I don't want my package to depend on array.el. So I grepped the git source of some other definition of `xor'. And I found 7 results: 7 functions doing the same thing, none of them in a satisfactory place. Should we figure out where to put the "main" `xor' and declare the rest as obsolete aliases? I attach the occurrences that I found. regards, Oleh --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=emacs-logical-xor-functions.txt -*- mode:grep; -*- 7 candidates: ./lisp/array.el:743:(defun xor (pred1 pred2) ./lisp/gnus/spam.el:711:(defun spam-xor (a b) ./lisp/org/org.el:10071:(defun org-xor (a b) ./lisp/play/5x5.el:934:(defun 5x5-xor (x y) ./lisp/proced.el:1197:(defsubst proced-xor (b1 b2) ./lisp/progmodes/idlwave.el:8816:(defmacro idlwave-xor (a b) ./lisp/vc/diff-mode.el:1773:(defsubst diff-xor (a b) (if a (if (not b) a) b)) --=-=-=--