简体   繁体   English

如何对保留了组成字符的Emacs缓冲区进行htmlfontify?

[英]How can I htmlfontify an Emacs buffer with composed characters preserved?

How can I htmlfontify a code buffer in Emacs without losing the composed characters? 如何在Emacs中对字体缓冲区进行HTML字体化而不丢失组成的字符?

I have several modes that display certain ASCII sequences as unicode using compose-region . 我有几种使用compose-region将某些ASCII序列显示为unicode的模式。 For example, I might write something like: 例如,我可能会写类似:

foo :: Num a => [a] -> a
foo = foldl (+) 0 . map (\ x -> x + f x - 10)

and the editor displays (without changing the buffer's actual contents): 然后编辑器显示(不更改缓冲区的实际内容):

foo ∷ Num a ⇒ [a] → a
foo = foldl (+) 0 ∘ map (λ x → x + f x - 10)

This is essentially another form of syntax highlighting, except with special characters instead of colors. 这实际上是语法突出显示的另一种形式,除了特殊字符而不是颜色之外。

However, when I use Mx htmlfontify-buffer on a buffer that looks like my second example, all this information is lost and the html output looks like the first version. 但是,当我在看起来像我的第二个示例Mx htmlfontify-buffer上使用Mx htmlfontify-buffer时,所有这些信息都会丢失,并且html输出看起来像第一个版本。 How can I avoid losing the character transformations? 如何避免丢失字符转换?

I don't think htmlfontify supports this feature yet. 我认为htmlfontify还不支持此功能。 But if you Mx report-emacs-bug to request the feature, you might find someone who can implement it fairly quickly (then again, maybe not). 但是,如果您通过Mx report-emacs-bug来请求该功能,则可能会找到可以相当快地实现它的人(然后再一次,也许不是)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM