update packages后,volatile-highlights使用异常

更新包后,出现⛔ Error (use-package): volatile-highlights/:init: Symbol’s function definition is void: volatile-highlights-mode,在.spacemacs的user-config中加入了(volatile-highlights-mode t)后,还是出现,一直只是使用emacs,没怎么自己调整过配置,故请教一下大家。

It caused by the vhl/define-minor-mode was marked as autoload and will be write into the autoloads.el when installing the package from melpa, but it’s actually a non-exits macro in the autoloads.el.

volatile-highlights.el/volatile-highlights.el

Lines 342 to 344 in 9007fca

;;;###autoload (vhl/define-minor-mode volatile-highlights-mode “Minor mode for visual feedback on some operations.” Please consider mark follow line with ###autoload to resolve the issue.

volatile-highlights.el/volatile-highlights.el

Lines 337 to 339 in 9007fca

(eval-and-compile ;; ‘easy-mmode-define-minor-mode’ is obsoleted alias (as of 30.1) (if (<= 30 emacs-major-version) Try install the package from melpa and check the volatile-highlights-autoloads.el to see the details.

Regression: Symbol’s function definition is void: volatile-highlights-mode · Issue #28 · k-talo/volatile-highlights.el

1 个赞

感谢,我按照这个讨论处理一下 :+1:

;;;###autoload
(eval-and-compile
  ;; ‘easy-mmode-define-minor-mode’ is obsoleted alias (as of 30.1)
  (if (<= 30 emacs-major-version)
      (defalias 'vhl/define-minor-mode 'define-minor-mode)
    (defalias 'vhl/define-minor-mode 'easy-mmode-define-minor-mode)))
;;;###autoload
(defun vhl/load-extensions ()
  (dolist (sym vhl/.installed-extensions)
    (vhl/load-extension sym)))

在这两处加了;;;###autoload后,M-x byte-force-recompile; M-x update-directory-autoloads; 重启emacs解决了。

1 个赞