GNU bug report logs -
#28267
26.0.50; Perhaps `semantic-format-tag-custom-list' should use `function-item' types?
Previous Next
Reported by: Samuel Bronson <naesten <at> gmail.com>
Date: Mon, 28 Aug 2017 19:48:02 UTC
Severity: minor
Tags: fixed
Found in version 26.0.50
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
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:
[Message part 2 (application/emacs-lisp, inline)]
[Message part 3 (text/plain, inline)]
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:
[Message part 4 (application/emacs-lisp, inline)]
[Message part 5 (text/plain, inline)]
Or, in patch form,
[Message part 6 (text/x-patch, inline)]
--- 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
This bug report was last modified 6 years and 30 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.