From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Paul W. Rankin" via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: [PATCH] Improve find-sibling-rules option type Date: Sun, 24 Sep 2023 11:03:27 +1000 Message-ID: <20230924010433.1770-1-hello@paulwrankin.com> Reply-To: "Paul W. Rankin" Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6830"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "Paul W. Rankin" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Sep 24 03:05:47 2023 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 1qkDZD-0001Vq-1N for ged-emacs-devel@m.gmane-mx.org; Sun, 24 Sep 2023 03:05:47 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkDYR-0004ZD-LO; Sat, 23 Sep 2023 21:04:59 -0400 Original-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 1qkDYQ-0004Z5-Fh for emacs-devel@gnu.org; Sat, 23 Sep 2023 21:04:58 -0400 Original-Received: from sendmail.purelymail.com ([34.202.193.197]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkDYO-0002xH-Uc for emacs-devel@gnu.org; Sat, 23 Sep 2023 21:04:58 -0400 Authentication-Results: purelymail.com; auth=pass DKIM-Signature: a=rsa-sha256; b=Nja03vJJLEYQziI+gntX3RZsHf6vh+HnDQ+xkvIv8Svcn/wnRtL7yXm2cRRa7xvEWNZvrHmJn0s90AsxHj3ZHAh8ADFDEZYX1mqSGeuMC0bQhNAc0IbpeRfTruzd2tGY0IFtft4ElhC7mOXXuzkCqww9I7LEuPgegYojOq2A3ZHfYwjZPVaf+aQkadlebFUqj2nBSkTLkA7nnPjSQRpYSzZ+H0SPnAyeGnsjyWFHqsiOFmNyv653471uy9X4hZ5XC/8vvmH4ckRGnkNUFlAehhWwUbCWOT2i6X1Xuw7UJCEkcpK/MpypQYJZtVR1ArNgBCZgKVMS1Y2QH5A1NYi0Bw==; s=purelymail2; d=paulwrankin.com; v=1; bh=kC/nqAGtWjljbEi/wuj5pMtb9UcKBI+/F3ZH/qycjLY=; h=Received:From:To:Subject; DKIM-Signature: a=rsa-sha256; b=Fl791PvacMex6AXLsnceafVVBIPV3UkpQp1xpTyciyfN1L/jKdgv9LH1YAAREdPyjMqkwZD/4Vazo4bz3njBX9FtF2HCsZ2YIsvgrTL4m6ePD9RgAcxquw3z9gQ0Qm8crpPamSLoHxE0dPaDWgR6j4EBeth+Fyxhm1w4NCGmBZZd1LjRqjSRF+d7Rt7JsWrbARoDQJMiwn3ASCh+u9ZMIFHE1hKJnHruikopeykiMtJy6Loeh9Ahl8XEbjcwiwEG9Z6+323zksMLkXxFGAEsOUF9oTDKrqJylM0+RztEefPavP1qjvL9xskWgn6tvalpzZeh3603TMXXfeEX64CYSg==; s=purelymail2; d=purelymail.com; v=1; bh=kC/nqAGtWjljbEi/wuj5pMtb9UcKBI+/F3ZH/qycjLY=; h=Feedback-ID:Received:From:To:Subject; Feedback-ID: 791:353:null:purelymail X-Pm-Original-To: emacs-devel@gnu.org Original-Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 1443425218; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sun, 24 Sep 2023 01:04:45 +0000 (UTC) X-Mailer: git-send-email 2.42.0 X-MIME-Autoconverted: from 8bit to quoted-printable by Purelymail Received-SPF: pass client-ip=34.202.193.197; envelope-from=hello@paulwrankin.com; helo=sendmail.purelymail.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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:311008 Archived-At: * lisp/files.el (find-sibling-rules): use alist with tags for custom type --- This is preferable than having to enter a sexp as a user option. lisp/files.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/files.el b/lisp/files.el index 9d76668..e7adccd 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -7572,7 +7572,8 @@ files, you could say something like: In this example, if you're in \"src/emacs/emacs-27/lisp/abbrev.el\", and a \"src/emacs/emacs-28/lisp/abbrev.el\" file exists, it's now defined as a sibling." - :type 'sexp + :type '(alist :key-type (string :tag "Match") + :value-type (string :tag "Expansion")) :version "29.1") =20 (defun find-sibling-file (file) --=20 2.42.0