From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: emacs-28 edb1d49: * lisp/net/shr.el (shr-expand-url): Also strip trailing Date: Thu, 23 Dec 2021 10:40:48 -0800 Message-ID: References: <20211223180957.11470.44284@vcs0.savannah.gnu.org> <20211223180958.5B91921362@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17434"; mail-complaints-to="usenet@ciao.gmane.io" To: Andreas Schwab , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 23 19:46:49 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n0T73-0004IO-AE for ged-emacs-devel@m.gmane-mx.org; Thu, 23 Dec 2021 19:46:49 +0100 Original-Received: from localhost ([::1]:41038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n0T70-0000Is-Di for ged-emacs-devel@m.gmane-mx.org; Thu, 23 Dec 2021 13:46:47 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0T2H-0005yZ-1U for emacs-devel@gnu.org; Thu, 23 Dec 2021 13:41:53 -0500 Original-Received: from [2607:f8b0:4864:20::430] (port=41739 helo=mail-pf1-x430.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n0T2E-0007vr-V5; Thu, 23 Dec 2021 13:41:52 -0500 Original-Received: by mail-pf1-x430.google.com with SMTP id m1so5959196pfk.8; Thu, 23 Dec 2021 10:40:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:in-reply-to:references:mime-version:date:message-id:subject:to; bh=xghnqXFGq0vBS3eUNsaULPyeRp6KgsTCo096xUIxJ+I=; b=l16mYQ5PRU6WPQXcKzM1wvzSXWHFUMZmytVuftEp350rOQj3Nc7+FcQxaGjB0Wkhsk LVA03SVjBKWmPEadofc4Yxskjd9lDMW/b+fASAAupw0vfPW3zDjaxs1oUl59PCF2w4ic e2qZPrxWD6Qb2k9BFdWg9Xjy2yfrxeNhQsAgrN+SHaJXHFsh04LG9gtb8j8tWWnHVzpR 8GfRo6bLz90KD7yCZJ1faltRAVUDBvT305uK0e6KwvKOGAdOnpbvQ7e6X0S4Ow0Za7se wDpNs4FYNHCZEMOW9K/eqDY+ITSp8MtGPU4LYpQWpK8u9Bl860DkkF26DcrhDsyf30Jb fVLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to; bh=xghnqXFGq0vBS3eUNsaULPyeRp6KgsTCo096xUIxJ+I=; b=MeBBfVfqZGLo2NeHTgJ+MSBB8wERQeWDykE4b668Wd/Pk+zysOy8s4DayjgksKWBBw KG/WtC2lehEE5K9CXrteVIGbVP07zy7OrILK5JUwRJQ/xpW6kV6kA+YBM8+wc70slvKa Da0JYosqkZ5yiDJetYPaDWqTSLmxArBr/D7W32geQNWaVu7XMd6hQIj3rdb9CDKn+SZv +nCWjfEM15+00VcWd8jlzKLukodC6J7ebsFRyprNzBYI75nO0MoJCUXNOZJTgnFnMcEX ry8Bz8tyUE6bGP+NZuM4RriJMI/91WPiQN/3U4wv0+KnEEfSs8iyh3DOo2XS/qIqvLUt pKUQ== X-Gm-Message-State: AOAM53061W7HFpW4rBTO1mNiquIDAD9dkbi8nALQwmBL8kbw87LxLPoW 6bhr7yuWLTJOMyShkA0BcIaIcP9qu5oJVTXfzZ+3lc0n X-Google-Smtp-Source: ABdhPJzuCwmOE4hm5R4YJ+i3EA7++0P1xboNdH9yT0Odwm9XdzxciZ/SYlxBJfx7sMr8n0Z6ph38qyx7IZttggsw1Dk= X-Received: by 2002:a62:7745:0:b0:4ba:7251:d559 with SMTP id s66-20020a627745000000b004ba7251d559mr3659404pfc.35.1640284848777; Thu, 23 Dec 2021 10:40:48 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 23 Dec 2021 10:40:48 -0800 In-Reply-To: <20211223180958.5B91921362@vcs0.savannah.gnu.org> X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::430 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=stefankangas@gmail.com; helo=mail-pf1-x430.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:283004 Archived-At: schwab@gnu.org (Andreas Schwab) writes: > - ;; Strip leading whitespace > + ;; Strip leading/trailing whitespace > (and url (string-match "\\`\\s-+" url) > (setq url (substring url (match-end 0)))) > + (and url (string-match "\\s-+\\'" url) > + (setq url (substring url 0 (match-beginning 0)))) This could be simplified to: (setq url (string-trim url))