Closed hutchjw closed 6 years ago
Hi hutchjw,
I have the following config in my init.el
;; YANG mode
(use-package yang-mode
:ensure t)
I was successful in loading the yang-mode by removing yang-mode.elc:
xxxxxx@yyyyyyy ~/.emacs.d/elpa $ cd yang-mode-20170323.1104/
xxxxxx@yyyyyyy ~/.emacs.d/elpa/yang-mode-20170323.1104 $ ls
yang-mode-autoloads.el yang-mode-pkg.el yang-mode.el yang-mode.elc
xxxxxx@yyyyyyy ~/.emacs.d/elpa/yang-mode-20170323.1104 $ rm yang-mode.elc
I hope this help.
Regards, Davide
I also need to use the work around to get yang-mode to work.
rm ~/.emacs.d/elpa/yang-mode-20170323.1104/yang-mode.elc
I'm not sure what the underlying bug is.
Fixed by aafb38e.
---------------Using commit version 0d5d5df86dbb6cbb2de3c0f2d0d5f8c8f29d0695, results in autoload.el with
;;;***
^L ;;;### (autoloads nil "yang-mode/yang-mode" "yang-mode/yang-mode.el"
;;;;;; (22740 3656 0 0))
;;; Generated autoloads from yang-mode/yang-mode.el
(autoload 'yang-mode "yang-mode" "" t nil)
(add-to-list 'auto-mode-alist '("\.yang\'" . yang-mode))
---------------------after making the following workaround, I was able to get it to work:
diff --git a/yang-mode.el b/yang-mode.el index 6d405a2..18811f3 100644 --- a/yang-mode.el +++ b/yang-mode.el @@ -358,8 +358,8 @@ (defmacro yang-define-derived-mode (mode &rest args) `(define-derived-mode ,mode nil ,@args)))
-;;;###autoload(autoload 'yang-mode "yang-mode" "" t nil) -(yang-define-derived-mode yang-mode "YANG" +;;;###autoload +(define-derived-mode yang-mode nil "YANG" "Major mode for editing YANG modules.
The hook `c-mode-common-hook' is run with no args at mode
----------------now the autoload.el looks like:
;;;***
^L ;;;### (autoloads nil "yang-mode/yang-mode" "yang-mode/yang-mode.el"
;;;;;; (22879 51536 0 0))
;;; Generated autoloads from yang-mode/yang-mode.el
(autoload 'yang-mode "yang-mode/yang-mode" "\
Major mode for editing YANG modules.
The hook
c-mode-common-hook' is run with no args at mode initialization, then
yang-mode-hook'.Key bindings:
\{yang-mode-map}
(fn)" t nil)
(add-to-list 'auto-mode-alist '("\.yang\'" . yang-mode))