From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Samuel Bronson Newsgroups: gmane.emacs.bugs Subject: bug#28267: 26.0.50; Perhaps `semantic-format-tag-custom-list' should use `function-item' types? Date: Mon, 28 Aug 2017 15:47:13 -0400 Message-ID: <877exnxyny.fsf@Sam-laptop> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1503949693 4491 195.159.176.226 (28 Aug 2017 19:48:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 28 Aug 2017 19:48:13 +0000 (UTC) To: 28267@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 28 21:48:06 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmQ0z-0000nG-W1 for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Aug 2017 21:48:06 +0200 Original-Received: from localhost ([::1]:41247 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmQ16-0001fs-V3 for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Aug 2017 15:48:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmQ0y-0001fk-4W for bug-gnu-emacs@gnu.org; Mon, 28 Aug 2017 15:48:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmQ0x-0000fi-7D for bug-gnu-emacs@gnu.org; Mon, 28 Aug 2017 15:48:04 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51028) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dmQ0x-0000fX-2i for bug-gnu-emacs@gnu.org; Mon, 28 Aug 2017 15:48:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dmQ0w-0000Nj-I9 for bug-gnu-emacs@gnu.org; Mon, 28 Aug 2017 15:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Samuel Bronson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Aug 2017 19:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28267 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15039496801457 (code B ref -1); Mon, 28 Aug 2017 19:48:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Aug 2017 19:48:00 +0000 Original-Received: from localhost ([127.0.0.1]:59709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmQ0s-0000NP-Ga for submit@debbugs.gnu.org; Mon, 28 Aug 2017 15:47:58 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37441) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmQ0r-0000NB-7d for submit@debbugs.gnu.org; Mon, 28 Aug 2017 15:47:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmQ0l-0000ZJ-8i for submit@debbugs.gnu.org; Mon, 28 Aug 2017 15:47:52 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:49762) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dmQ0l-0000ZA-4T for submit@debbugs.gnu.org; Mon, 28 Aug 2017 15:47:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmQ0j-0001fI-Su for bug-gnu-emacs@gnu.org; Mon, 28 Aug 2017 15:47:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmQ0j-0000Xl-0W for bug-gnu-emacs@gnu.org; Mon, 28 Aug 2017 15:47:49 -0400 Original-Received: from mail-qk0-x22e.google.com ([2607:f8b0:400d:c09::22e]:37629) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dmQ0i-0000WF-QW for bug-gnu-emacs@gnu.org; Mon, 28 Aug 2017 15:47:48 -0400 Original-Received: by mail-qk0-x22e.google.com with SMTP id k126so6875224qkb.4 for ; Mon, 28 Aug 2017 12:47:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=KoVWqyaDFJBm44aVJq91N7oaybXNAltf2IqiOFaYFb0=; b=GpQrTMfFCKpD1LESEA4Bo9hvI+5e8guFjdPlPFWwxGZJKFCUvDyi4RSX2miMUwWDIu 3MU6NXFoGkbkROrpKDx3rR+FmIhUgY+FMFQACHxjqcPFHdV2OzxOFSe0C1zNVqOVcevY Y99xCrQU7pbLGZqZQhq5AexaGEltmwU9/ohpjntH54QCVUEg0ICxOSgpDqB2wkPbR6Z0 hjqMH8GjmJofdrzrjYxHp2qBa101/ijjYJE+huUWcdAQgZ6KrurMd23Dx7r8BfPpHHHM VdWRn+j+DTi1xpTbcjklu8M2gfQwG9hn+D11mrwjAtKXoZj9ulvlB0NC2tDb7GSIql/7 fV3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=KoVWqyaDFJBm44aVJq91N7oaybXNAltf2IqiOFaYFb0=; b=r7AN7rrxkcbAAz5ymrrNGRvdfW0GpBLP3FllhT98M7ULCXe1ND3FWxenfIL2XTkBYb +yOGHG9Sy9Bsaj8swwgCSE5b1IxTXwm8R8muhrXcJ4azez/lEVyxJYqDY27OcKiRgD0z cgZERp9hyCCAjfOa+dBw+j5qx+R8YtVOy8J3dBCKpPP0FICfKRoWB7CGYszyZ+CzqCRL wa0NSvtBkjoq3nspNYrmi0Gm+XXiaoslx4vmqUXaQDBRHbJdjHkC7iG9aDEhGPhHYtVy HikUD1NemBqpD3oeZiXN7OUUoY5ypHB5tjWHdFroDNyLoEzVmXuDPPwQ/gy6epPECU2x 6aww== X-Gm-Message-State: AHYfb5iJitZ1SeglDeasWsOwE6c1BS+B5kHNDzxFAehYxcBgLJ75mpgy D+Y9tKP3/AXPTSEA X-Received: by 10.55.154.138 with SMTP id c132mr2265306qke.135.1503949664999; Mon, 28 Aug 2017 12:47:44 -0700 (PDT) Original-Received: from Sam-laptop ([2001:470:1f07:57:1523:fc47:d9a:f47f]) by smtp.gmail.com with ESMTPSA id p64sm725538qkd.94.2017.08.28.12.47.41 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Aug 2017 12:47:41 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:136307 Archived-At: --=-=-= Content-Type: text/plain So, I was customizing the `speedbar' group, and I happened to notice that the entries for `semantic-sb-button-format-tag-function' and `semantic-sb-info-format-tag-function' offered extremely little in the way of documentation, and while the docstrings for those variables could do a better job of describing the contexts to which they are relevant, the main difficulty is in knowing what the various choices mean. A quick look in the vicinity of the functions' definitions revealed the variable `semantic-format-tag-custom-list', which turns out to be where the :type for those two settings comes from. It is defined as follows: --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline Content-Transfer-Encoding: quoted-printable (defvar semantic-format-tag-custom-list (append '(radio) (mapcar (lambda (f) (list 'const f)) semantic-format-tag-functions) '(function)) "A List used by customizable variables to choose a tag to text function. Use this variable in the :type field of a customizable variable.") --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable It turns out that the documentation for `radio' types explicitly mentions what we probably want here: ,---- | =E2=80=98(radio ELEMENT-TYPES...)=E2=80=99 | This is similar to =E2=80=98choice=E2=80=99, except that the choices= are displayed | using radio buttons rather than a menu. This has the advantage of | displaying documentation for the choices when applicable and so is | often a good choice for a choice between constant functions | (=E2=80=98function-item=E2=80=99 customization types). `---- So it looks like we want to change the definition to: --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline Content-Transfer-Encoding: quoted-printable (defvar semantic-format-tag-custom-list (append '(radio) (mapcar (lambda (f) (list 'function-item f)) semantic-format-tag-functions) '(function)) "A List used by customizable variables to choose a tag to text function. Use this variable in the :type field of a customizable variable.") --=-=-= Content-Type: text/plain Or, in patch form, --=-=-= Content-Type: text/x-patch Content-Disposition: inline Content-Description: Patch --- a/lisp/cedet/semantic/format.el +++ b/lisp/cedet/semantic/format.el @@ -67,7 +67,7 @@ (defvar semantic-format-tag-custom-list (append '(radio) - (mapcar (lambda (f) (list 'const f)) + (mapcar (lambda (f) (list 'function-item f)) semantic-format-tag-functions) '(function)) "A List used by customizable variables to choose a tag to text function. Diff finished. Mon Aug 28 15:42:17 2017 --=-=-=--