问题
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
but Emacs shows a distracting strikethrough
How do I get rid of it?
回答1:
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)))))
来源:https://stackoverflow.com/questions/43098176/strikethrough-in-emacs-image-mode