unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Paul W. Rankin" via "Emacs development discussions." <emacs-devel@gnu.org>
To: emacs-devel@gnu.org
Cc: "Paul W. Rankin" <hello@paulwrankin.com>
Subject: [PATCH] Improve find-sibling-rules option type
Date: Sun, 24 Sep 2023 11:03:27 +1000	[thread overview]
Message-ID: <20230924010433.1770-1-hello@paulwrankin.com> (raw)

* 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")
 
 (defun find-sibling-file (file)
-- 
2.42.0




             reply	other threads:[~2023-09-24  1:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-24  1:03 Paul W. Rankin via Emacs development discussions. [this message]
2023-09-24  5:33 ` [PATCH] Improve find-sibling-rules option type Eli Zaretskii
2023-09-24  9:44   ` Mauro Aranda
2023-09-25  1:17     ` Paul W. Rankin via Emacs development discussions.
2023-09-25  9:52       ` Mauro Aranda
2023-09-24  8:34 ` Philip Kaludercic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230924010433.1770-1-hello@paulwrankin.com \
    --to=emacs-devel@gnu.org \
    --cc=hello@paulwrankin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).