From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uO0UJ5OSzmPsEgAAbAwnHQ (envelope-from ) for ; Mon, 23 Jan 2023 14:58:43 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id KD3iJpOSzmOhfAEAauVa8A (envelope-from ) for ; Mon, 23 Jan 2023 14:58:43 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 772561596B for ; Mon, 23 Jan 2023 14:58:43 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJxKg-0001pj-8t; Mon, 23 Jan 2023 08:57:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJxKd-0001pP-MC for emacs-orgmode@gnu.org; Mon, 23 Jan 2023 08:57:56 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJxKc-0007ah-1Z for emacs-orgmode@gnu.org; Mon, 23 Jan 2023 08:57:55 -0500 Received: by mail-wm1-x335.google.com with SMTP id g10so9088551wmo.1 for ; Mon, 23 Jan 2023 05:57:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:gmane-reply-to-list:subject:to:from :from:to:cc:subject:date:message-id:reply-to; bh=CH00XzGEq0uc0bG/pM6qzNFUsgjxh7JwesTbWVeKvYs=; b=hHNG87jhHZcxNS9gpBw7FmR4uqFJJ5tHP5CHkpYWxKfpPM5vU+pPsGilKkl1X/Wj6w QWLQRY5aWuelHE+w9/WGG9tlemUKuhIZhxwv4CQHXvUcVNnddkSZxM4vV+id6nosGfRu 7wKQwuHeX20/IAkeGyuOBlSJXmGdr9OsJQRcUS5e46v5N8klSCaxlDwmT1npzzp+aVzG xGT4yX/SgbB9K/kq3cS8HetbI8mwDo2n9+GP6c6rZv9iboX15y2/caewya9vcZupmUUl A2s8QgRBieNCdUTe5ZBnR/jKXBNC7vVeymubC/VA4e4ZAnwNZCZdQ9w0wh17jhztDMYV T2Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:gmane-reply-to-list:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CH00XzGEq0uc0bG/pM6qzNFUsgjxh7JwesTbWVeKvYs=; b=LsA/dae4SWHSQrrNpClnyHLZJ8UI8kpD456Sgc0MpMkVFljLdg1tr/pxRArxmx/dKD NRqoi2Nh/8l4G0GXJU6FxztEYmgapbcBRN0zXYpFNysfl307vUwuES/O1aVUXuSin8OJ mUHcRXbdW5Zq0S2rezLIuRUr+4lYuyLgoJiPDYqm3jP+kU6X6pFNVBYwR8SKLO1CHZgU 9e/3UkjMBYWWi5aV5mT7nT+co4Z3seK+exeJVE4pSgVf0w+Z/kE81reCT0FZYl9bkCxV ffRTu6smMJ9L/TMh4OMYp8MDHHCOJz/oeO2AM2WJPlkVPUkRLtRd74KV5AWO3YzgKinM uAHA== X-Gm-Message-State: AFqh2kohMaD6PzMlAY+hJ/gj2ufJRpgO0R/0N5Vce7xUTx+gBp8932lG eYUza2UuFynyRwrz+37lmGn37nh4Ggo= X-Google-Smtp-Source: AMrXdXsm/KkLUBGJCChKE4KDCl4qIAsRcOECqaKapPr7s5z5JokMqz5t7uKKl6s+tNEzOIY8jGx4+Q== X-Received: by 2002:a05:600c:982:b0:3da:f5b5:13ec with SMTP id w2-20020a05600c098200b003daf5b513ecmr22947131wmp.34.1674482272032; Mon, 23 Jan 2023 05:57:52 -0800 (PST) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id s5-20020a1cf205000000b003b47b80cec3sm10708631wmc.42.2023.01.23.05.57.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jan 2023 05:57:51 -0800 (PST) From: Robert Pluim To: emacs-orgmode@gnu.org Subject: [PATCH] Fix some emacs-30 byte-compile warnings Gmane-Reply-To-List: yes Date: Mon, 23 Jan 2023 14:57:50 +0100 Message-ID: <87pmb51hgh.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=rpluim@gmail.com; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674482323; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=CH00XzGEq0uc0bG/pM6qzNFUsgjxh7JwesTbWVeKvYs=; b=Y6fCUunD9qc5NHSYyP8JFhtOuhDlA7hABlrIJpWGRTaMWl72JTvJx47wKSqbQB/OKEfajO yFoUBB5ugLbNZT6jxaYbHd64QNKWHrscaurgYW+oqIgWwF8kxcRZYe0cnqeXAeLzLLHg9A cAzLhrX27j6oFLZogpNrJUJfrhztcZPBXKGVncaQhoryYYXNNyO1cqTiY/hG51/FoUGjO3 LC+L2+S0B1QXjPJsZVI5FJipLOhzCSgAbStfAPJfm0itBsQMIyEh1R4H11abkIhRSMHUHG t/jKTT9I5WLDoKhH/+CCdvWISDXQWjq4Ay8Wqze7RkU1kMafPdYzCxhq/qgPwA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=hHNG87jh; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674482323; a=rsa-sha256; cv=none; b=nqexyvNzGzS2uioH7cgr4E5hncm3LkQa8z1epoeZhM4fc4D9ngQvxAwC1U5ynza0olzZNw mthT/TnugFA7w/NhVzH/IlrJZ+vJFbO30oXLmQ8G0w0TkGer9gX0Cgj5j99WpINlGxAkhQ QLOc1B6bgSusw16lFWVqQOp4itdgiLR7K862EYfvybiP0BWzHvcdoQ/CaUtgP0xrN8JTp9 rnmLIX/lycq5ruK5pr91OnFyNHP+8MsCi7mkYcnsjXui98bqzS1+93Py3/CmTUbylcg9Nq COHlKXcE5/VSmktp7yu5mXiwz1kO6AE14ECQosFT9bpOrGI2iHSviwsv1Uulvw== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=hHNG87jh; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -6.25 X-Spam-Score: -6.25 X-Migadu-Queue-Id: 772561596B X-Migadu-Scanner: scn1.migadu.com X-TUID: tsjIrW4NV6BD The emacs 30 byte-compiler warns about uses of `eq' and similar with constant strings which might have unintended semantics. Patch is against emacs master. -- >8 -- * lisp/org/ob-octave.el (org-babel-octave-evaluate-session): Use `delete' instead of `delq' when deleting a constant string. * lisp/org/org-agenda.el (org-agenda-format-item): Use `string=' when comparing to a constant string. * lisp/org/org-element.el (org-element-cache-map): Use `equal' when comparing to a constant list. * lisp/org/org-table.el (org-table-make-reference): Use `string=' when comparing to a constant string. --- diff --git c/lisp/org/ob-octave.el i/lisp/org/ob-octave.el index 9bf16b9849..e411961e92 100644 --- c/lisp/org/ob-octave.el +++ i/lisp/org/ob-octave.el @@ -243,7 +243,7 @@ org-babel-octave-evaluate-session (`output (setq results (if matlabp - (cdr (reverse (delq "" (mapcar #'org-strip-quotes + (cdr (reverse (delete "" (mapcar #'org-strip-quotes (mapcar #'org-trim raw))))) (cdr (member org-babel-octave-eoe-output (reverse (mapcar #'org-strip-quotes diff --git c/lisp/org/org-agenda.el i/lisp/org/org-agenda.el index 2d194ad341..b0587d5d92 100644 --- c/lisp/org/org-agenda.el +++ i/lisp/org/org-agenda.el @@ -7326,7 +7326,7 @@ org-agenda-format-item (let ((s (org-format-outline-path (org-get-outline-path) (1- (frame-width)) nil org-agenda-breadcrumbs-separator))) - (if (eq "" s) "" (concat s org-agenda-breadcrumbs-separator)))))) + (if (string= "" s) "" (concat s org-agenda-breadcrumbs-separator)))))) (setq time (cond (s2 (concat (org-agenda-time-of-day-to-ampm-maybe s1) "-" (org-agenda-time-of-day-to-ampm-maybe s2) diff --git c/lisp/org/org-element.el i/lisp/org/org-element.el index 389acf8250..e427966f57 100644 --- c/lisp/org/org-element.el +++ i/lisp/org/org-element.el @@ -7558,7 +7558,7 @@ org-element-cache-map ;; beginning. (next-element-re (pcase granularity ((or `headline - (guard (eq '(headline) + (guard (equal '(headline) restrict-elements))) (cons (org-with-limited-levels @@ -7566,7 +7566,7 @@ org-element-cache-map 'match-beg)) (`headline+inlinetask (cons - (if (eq '(inlinetask) restrict-elements) + (if (equal '(inlinetask) restrict-elements) (org-inlinetask-outline-regexp) org-element-headline-re) 'match-beg)) diff --git c/lisp/org/org-table.el i/lisp/org/org-table.el index 5116b1127f..fbfdc253f9 100644 --- c/lisp/org/org-table.el +++ i/lisp/org/org-table.el @@ -2861,7 +2861,7 @@ org-table-make-reference (if lispp (if (eq lispp 'literal) elements - (if (and (eq elements "") (not keep-empty)) + (if (and (string= elements "") (not keep-empty)) "" (prin1-to-string (if numbers (string-to-number elements) elements)))) Robert --