elisp - How to make a long word get displayed as a shorter word in an emacs buffer? -
i reading source of rainbow-delimiters.el
, trying replace word rainbow-delimiters
rd
using code got somewhere replaces word lambda
greek letter.
this code came , doesn't want.
(defun my-simplify-prefix (prefix) ;; (interactive "sprefix: ") (interactive (list "rainbow-delimiters")) (font-lock-add-keywords nil `((,(rx-to-string `(group ,prefix)) (0 (progn (compose-region (match-beginning 1) (match-end 1) "rd") nil))))) (font-lock-fontify-buffer))
what instead replaces rainbow-delimiters
1 letter combination of r , d.
(defun my-simplify-prefix (prefix) (interactive "sprefix: ") (font-lock-add-keywords nil `((,(rx-to-string `(group ,prefix)) (0 (progn (put-text-property (match-beginning 1) (match-end 1) 'display "rd") nil))))) (font-lock-fontify-buffer))
Comments
Post a Comment