* bug#28267: 26.0.50; Perhaps `semantic-format-tag-custom-list' should use `function-item' types?
@ 2017-08-28 19:47 Samuel Bronson
2019-07-15 11:42 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Samuel Bronson @ 2017-08-28 19:47 UTC (permalink / raw)
To: 28267
[-- Attachment #1: Type: text/plain, Size: 633 bytes --]
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:
[-- Attachment #2: Type: application/emacs-lisp, Size: 297 bytes --]
[-- Attachment #3: Type: text/plain, Size: 563 bytes --]
It turns out that the documentation for `radio' types explicitly
mentions what we probably want here:
,----
| ‘(radio ELEMENT-TYPES...)’
| This is similar to ‘choice’, 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
| (‘function-item’ customization types).
`----
So it looks like we want to change the definition to:
[-- Attachment #4: Type: application/emacs-lisp, Size: 305 bytes --]
[-- Attachment #5: Type: text/plain, Size: 21 bytes --]
Or, in patch form,
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #6: Patch --]
[-- Type: text/x-patch, Size: 415 bytes --]
--- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#28267: 26.0.50; Perhaps `semantic-format-tag-custom-list' should use `function-item' types?
2017-08-28 19:47 bug#28267: 26.0.50; Perhaps `semantic-format-tag-custom-list' should use `function-item' types? Samuel Bronson
@ 2019-07-15 11:42 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-15 11:42 UTC (permalink / raw)
To: Samuel Bronson; +Cc: 28267
Samuel Bronson <naesten@gmail.com> writes:
> (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.
Thanks; makes sense. I've now applied it to the Emacs trunk.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-15 11:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-28 19:47 bug#28267: 26.0.50; Perhaps `semantic-format-tag-custom-list' should use `function-item' types? Samuel Bronson
2019-07-15 11:42 ` Lars Ingebrigtsen
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).