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: master ff4de1b: Fix quoting style in Lisp comments Date: Fri, 17 Sep 2021 15:46:25 -0700 Message-ID: References: <20210912165141.9491.52637@vcs0.savannah.gnu.org> <83v934emk7.fsf@gnu.org> <87sfy8d7oo.fsf@gnus.org> <9194fc93-fb9c-000f-a35a-321ddd259893@gmx.at> <8735q5yi63.fsf@mail.linkov.net> <83czp9by3s.fsf@gnu.org> <05cbffe0-f89b-ff54-64f5-cd1d11bac4f5@yandex.ru> <831r5pbt7j.fsf@gnu.org> <83wnnhacy4.fsf@gnu.org> <40937e22-994f-466c-87be-4f70a522118a@yandex.ru> <83o88t9kgb.fsf@gnu.org> <9672aeae-a969-1526-003b-abb1b00b5b49@yandex.ru> <87sfy43dlt.fsf@gnus.org> <1a0f9230b7d75e426474@heytings.org> <838rzv8ozz.fsf@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="597"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, rudalics@gmx.at, gregory@heytings.org, monnier@iro.umontreal.ca, dgutov@yandex.ru, larsi@gnus.org, juri@linkov.net To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 18 00:47:12 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 1mRMdU-000AVd-BE for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Sep 2021 00:47:12 +0200 Original-Received: from localhost ([::1]:40440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRMdS-00012g-Co for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Sep 2021 18:47:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRMcn-0000L2-EM for emacs-devel@gnu.org; Fri, 17 Sep 2021 18:46:30 -0400 Original-Received: from mail-pj1-f54.google.com ([209.85.216.54]:44760) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mRMcl-000783-VO; Fri, 17 Sep 2021 18:46:29 -0400 Original-Received: by mail-pj1-f54.google.com with SMTP id nn5-20020a17090b38c500b0019af1c4b31fso8424628pjb.3; Fri, 17 Sep 2021 15:46:27 -0700 (PDT) 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:cc; bh=nPtR0SUhEaS6OTsQplDiq/T6DTBdj3REo3L6py+OtXU=; b=WE9IVP0Y9R94Am6p8Wvwxaf76BOnEjlJQG5kbbCgPcCJz4b8iN13615qs4OUi8TeXZ lSNeIHSXpKGclZBxQMwHgLP929xDmFZjrVUCfyf0BOXjdJAd9x/Dd1L+JMLr9DRPdEw2 SMBHhoQQOMHu8oBUb7PqGZV4N7UKEvpWX7ahXdMVAiSVj0bWE6cEPK9QhD/tHaUtEy+f gZad34LUA1AcC+2CkvSQ+YiTIM10Yb6QW2aD0vr7uCHf9EuDNCDc3T6nX8iMOjxsg7bK z7KhnXxN5Wl1cNP926dvUPxQB69mtSsJ+RSGCUHNnUMWLlQVzdsFjwolmJRtRwxJCigo geOQ== X-Gm-Message-State: AOAM532doMhZNw8fDNQpkE5t/VmfKWI62XVXXUhaLj3ukl8XOeawNPM8 dy8zURmWcAmkn/Ioz8Bd0ocqdEH9wkbJEG/0L7WXl/6a X-Google-Smtp-Source: ABdhPJwmKmNu9wuT8Omqvy+Ck+pV8Akt1rCwtZvQH1z2Ucyb/ZAqnPmYOPQv/Q7knVjPIUT/Zmz2pkN29Yf9mmkpcFs= X-Received: by 2002:a17:90b:3805:: with SMTP id mq5mr23017170pjb.143.1631918786186; Fri, 17 Sep 2021 15:46:26 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 17 Sep 2021 15:46:25 -0700 In-Reply-To: <838rzv8ozz.fsf@gnu.org> Received-SPF: pass client-ip=209.85.216.54; envelope-from=stefankangas@gmail.com; helo=mail-pj1-f54.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.23 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:274945 Archived-At: Eli Zaretskii writes: >> IMO, we should automatically display in comments and docstrings whatever >> quote character the user prefers according to `text-quoting-style', and >> automatically insert the correct quote character when typing "'". > > Patches welcome to make that happen. One idea for implementation > would be to use the display-table feature. I can't see any way to limit `buffer-display-table' to docstrings. Am I missing something? Here's what I tried: (define-minor-mode emacs-lisp-fancy-docstring-mode "Minor mode for fancy display of Emacs Lisp `docstrings'." :init-value nil (if emacs-lisp-fancy-docstring-mode (let ((table (or (copy-sequence standard-display-table) (make-display-table)))) (aset table ?` `[,(string-to-char (substitute-command-keys "`"))]) (aset table ?' `[,(string-to-char (substitute-command-keys "'"))]) (setq buffer-display-table table)) (setq buffer-display-table nil))) It does the job in the sense that it correctly displays these quotes in docstrings, but it also does it in code, which makes things hard to read.