Strikethrough in Emacs image mode

2019-07-24 14:51发布

With a .emacs loading iimage-mode and adoc-mode:

;; Don't glare 200W in my eyes all day:
(set-foreground-color "white")
(set-background-color "black")

;; Use adoc as major mode for any file with the extension .adoc.
(require 'adoc-mode)
(setq auto-mode-alist (cons '("\\.adoc\\'" . adoc-mode) auto-mode-alist))

;; Use iimage-mode as minor mode whenever we're in adoc-mode.
(add-hook 'adoc-mode-hook 'my-adoc-mode-hook)
(defun my-adoc-mode-hook ()
  "Custom `adoc-mode' behaviours."
  (iimage-mode 1))

if I convert the file file.adoc

.A PNG smiley
image::smiley.png[]

to HTML using Asciidoctor

asciidoctor file.adoc

I get the nicely formatted HTML file

easy HTML

but Emacs shows a distracting strikethrough

strikethrough

How do I get rid of it?

1条回答
爷的心禁止访问
2楼-- · 2019-07-24 15:22

It looks like you're running into adoc's markup fontification for internal references. I was able to make that line go away by removing the underlining from markup-internal-reference-face. Something like this added to your .emacs might fix it:

(custom-set-faces
 '(markup-internal-reference-face ((t (:inherit markup-meta-face)))))
查看更多
登录 后发表回答