Closed vllur closed 3 years ago
Could you try this nano-modeline and reports if the error is the same?
I have made little sample config that uses only straight.el, web-mode and nano-modeline and the error is exactly the same.
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(setq straight-use-package-by-default t)
(straight-use-package 'web-mode)
(straight-use-package '(nano-modeline :type git :host github
:repo "rougier/nano-modeline"))
(require 'nano-modeline)
(nano-modeline)
Seems like line 625 and default is the problem. It calls (nano-modeline-default-mode)
, which uses nano-mode-name
to compose the string. mode-name
in this case is (sgml-xml-mode "XHTML+" "HTML+")
, so the first element is sgml-xml-mode
. As I understand it's a boolean, so it's either t
or nil
, never char/string.
I see. I think we should replace the mode-name code with something like (format-mode-line mode-name)
. Could you test and make a PR if this works ?
It works, I made a pull request in nano-modeline repo, so I will close the issue.
With web-mode, modeline disappears in HTML files buffers and this shows in the Messages buffer:
HTML syntax highlighting is also broken, but CSS files works fine. I'm not sure why this happens.