You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When opening a .yang file that has yang-mode associated with it and using the latest version (20190507.724) of this code Emacs complains that imenu support is not available: I get the following traceback.
Debugger entered--Lisp error: (imenu-unavailable "The mode ‘YANG//l’ does not support Imenu")
signal(imenu-unavailable ("The mode ‘YANG//l’ does not support Imenu"))
imenu-unavailable-error("The mode `%s' does not support Imenu" "YANG//l")
imenu-add-to-menubar("Defs")
imenup-add-defs-to-menubar()
run-hooks(change-major-mode-after-body-hook prog-mode-hook c-mode-common-hook yang-mode-hook)
apply(run-hooks (change-major-mode-after-body-hook prog-mode-hook c-mode-common-hook yang-mode-hook))
run-mode-hooks(yang-mode-hook)
yang-mode()
set-auto-mode-0(yang-mode nil)
set-auto-mode()
normal-mode(t)
after-find-file(nil t)
find-file-noselect-1(#<buffer [email protected]> "~/devpub/yang/yang/standard/ieee/published/1906.1/[email protected]" nil nil "~/devpub/ya$
find-file-noselect("/Users/roup/devpub/yang/yang/standard/ieee/published/1906.1/[email protected]" nil nil nil)
find-file("/Users/roup/devpub/yang/yang/standard/ieee/published/1906.1/[email protected]")
dired-find-file()
funcall-interactively(dired-find-file)
#<subr call-interactively>(dired-find-file nil nil)
apply(#<subr call-interactively> dired-find-file (nil nil))
call-interactively@ido-cr+-record-current-command(#<subr call-interactively> dired-find-file nil nil)
apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (dired-find-file nil nil))
call-interactively(dired-find-file nil nil)
command-execute(dired-find-file)
I have not written any function to hook into yang-mode yet.
I am using Emacs 26.3
The text was updated successfully, but these errors were encountered:
I did not notice the 'p' in the imenup-add-defs-to-menubar(). This is a imenu+ function. If I disable the use of imenu+ from my setup, the problem goes away. If I set imenu-generic-expression to something valid inside yang-mode the problem also goes away (with the added benefit of supporting imenu).
The imenu+ issue has to do with it expecting the imenu-generic-expression to be set. This has nothing to do about the yang code. The yang-mode code can stay as is and it's possible to add imenu (and imenu+) support via hooks. But Iit might also be a good idea to have built-in imenu support.
When opening a .yang file that has yang-mode associated with it and using the latest version (20190507.724) of this code Emacs complains that imenu support is not available: I get the following traceback.
The text was updated successfully, but these errors were encountered: