From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: bind print-integers-as-characters to t in `describe-variable'? Date: Thu, 16 May 2024 14:58:36 +0300 Message-ID: <86seyihssz.fsf@gnu.org> References: <87eda3ju61.fsf@gmail.com> <945DC9F4-7316-4B0F-B507-8B914B6A9FC4@gmail.com> <86v83fthjb.fsf@gnu.org> <875xve71hu.fsf@posteo.net> <865xvejgb2.fsf@gnu.org> <871q626s9t.fsf@posteo.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11955"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mattias.engdegard@gmail.com, rpluim@gmail.com, emacs-devel@gnu.org To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 16 13:59:47 2024 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 1s7Zly-0002qU-UJ for ged-emacs-devel@m.gmane-mx.org; Thu, 16 May 2024 13:59:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7ZlJ-00037e-QI; Thu, 16 May 2024 07:59:05 -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 1s7ZlH-00037A-Kx for emacs-devel@gnu.org; Thu, 16 May 2024 07:59:03 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s7ZlH-0000wP-4P; Thu, 16 May 2024 07:59:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=mZJ+Yt4Clr/Gx8W+jzDK9W+Z7A7pVtARnKhzN8PtuAo=; b=WuIedLV98fp6 IuhmS0jEAr3VrjfdJghmYO1G3OMMOfrl2Xzgn3tk70d8WvI+TMf8iYuvjaZHD/zA9gazGmKF0lkFr ISzuYFVOJANUIcmFKCEVwSHxFfCH2/IC9bX7fnDHdhu3aVapNeIObhe6MM6RlXqaGocXHGJyTBEZZ w2QaeKYjfc7/TFpXxyzy7DJmIO5pwm7O8DCvY0RIASa0gQwn8RtC+1AHobmMozkz0Kz05ws881b3+ iXdJ00ldAOAO4g7F+kxe2zRfqC5xmRX29qwITbyUqNVz/81F2oak/QF83XBq3yd9h1HMueMR4PW8J HKQTWVdLHoGlbuOVaujDKw==; In-Reply-To: <871q626s9t.fsf@posteo.net> (message from Philip Kaludercic on Thu, 16 May 2024 09:05:34 +0000) 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:319293 Archived-At: > From: Philip Kaludercic > Cc: mattias.engdegard@gmail.com, rpluim@gmail.com, emacs-devel@gnu.org > Date: Thu, 16 May 2024 09:05:34 +0000 > > >> Why not bind it depending on the type of the user option? > > > > How do you tell "the type of the user option"? > > E.g. using (get 'fill-column 'custom-type) ;=> integer You took the easy case. In a more general case, we'd need a parser to understand what's TRT: (get 'electric-quote-chars 'custom-type) => (list character character character character) And we definitely could have defcustoms which say 'integer', but can accept both numbers and characters. And then there are variables, not user options ("C-h v" is not only for defcustom's).