Emacs 图像模式中的删除线

Strikethrough in Emacs image mode

.emacs 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))

如果我转换文件 file.adoc

.A PNG smiley
image::smiley.png[]
使用 Asciidoctor

到 HTML

asciidoctor file.adoc

我得到了格式很好的 HTML 文件

但是 Emacs 显示了一个分散注意力的删除线

我该如何摆脱它?

您似乎 运行 喜欢 adoc 的内部参考标记字体化。通过从 markup-internal-reference-face 中删除下划线,我能够使该行消失。添加到您的 .emacs 中的类似内容可能会解决问题:

(custom-set-faces
 '(markup-internal-reference-face ((t (:inherit markup-meta-face)))))