Emacs region highlighting

后端 未结 2 987
悲&欢浪女
悲&欢浪女 2021-01-13 12:25

Is there a way to highlight a string in a text (but not ALL such strings) in a buffer where font-lock-mode is on.

Let\'s imagine I have a buffer with SQL mode and

2条回答
  •  滥情空心
    2021-01-13 13:19

    Maybe this helps:

    • open ***scratch* buffer and enter:
    
    (with-current-buffer "foo" (add-text-properties 1 10 '(comment t face highlight)))
    
    • then evaluate with C-j

    Characters 1-10 will be highlited in buffer "foo".

提交回复
热议问题