Error displaying `mumamo-major-modes' and `mumamo-heredoc-modes' customization widgets

Bug #1024188 reported by Daniel Hackney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nXhtml
New
Undecided
Unassigned

Bug Description

When trying to display `mumamo-major-modes', an error is signaled:

  widget-apply: Symbol's function definition is void: nil

The problem is that `ourcomments-widgets' has not yet been loaded to provide the definition for the widget.

For `mumamo-heredoc-modes', widget formatting is not applied if there are symbols in the list which are not yet defined. For a stock Emacs 24.1, `groovy-mode' is not included and so prevents the customize widget from displaying the values properly.

Changing the definition from

  major-mode-function

to

  (choice
    (major-mode-function :tag "Major mode")
    (symbol :tag "Major mode (not yet loaded)"))

as is done in `mumamo-major-modes' fixes this problem.

On a side note: according to `(elisp) Composite Types', a simpler format for `defcustom' type declarations like in `mumamo-heredoc-modes' would be replacing:

  :type '(repeat
            (list
             regexp
             (function :tag "Major mode")))

with

  :type '(alist
           :key-type symbol
            :value-type (group symbol))

The difference is mostly stylistic.

I'm on Emacs 24.1 with a version of nXhtml from a week or two ago.
h

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.