bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#35480: insert-wide-parentheses


From: Juri Linkov
Subject: bug#35480: insert-wide-parentheses
Date: Tue, 07 May 2019 23:21:57 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> Also tried to add a button that would pre-fill the default value
>> with Unicode bracket pairs, but I see no way to do this because
>> customize's :options is limited to ‘hook’, ‘plist’, ‘alist’ types
>> only, alas.
>
> Can't you use the alist type?  The options is called insert-pair-ALIST
> after all.

I tried the alist type:

(defcustom insert-pair-alist
  '((?\( ?\)) (?\[ ?\]) (?\{ ?\}) (?\< ?\>) (?\" ?\") (?\' ?\') (?\` ?\'))
  "Alist of paired characters inserted by `insert-pair'."
  :type '(alist :key-type (character :tag "Open/Command")
                :value-type (choice
                             (list :tag "Pair"
                                   (character :tag "Close"))
                             (list :tag "Triplet"
                                   (character :tag "Open")
                                   (character :tag "Close"))))
  :options '(?\()
  :group 'lisp
  :version "27.1")

but its :options allows specifying only keys, not alist values.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]