Is it possible to customise emacs such that python docstrings are highlighted the same way as comments are? Here is an example of a python docstring
def python_function(argument):
"""
doc string here
may be multiline
"""
return some_func(argument)
With python-mode.el, customize font-lock-doc-face
accordingly. This needs also py-use-font-lock-doc-face-p
set to t
.
Besides all faces are customizable. Mx customize-face
RET font-lock-string-face
RET and set it to the value wanted. However this would affect all modes.
从Emacs 25.1开始,Emacs内置的python.el
显示带有font-lock-doc-face
文档字符串。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.