[Emacs] Remove prettified keywords

This commit is contained in:
Lucien Cartier-Tilet 2022-04-18 21:17:09 +02:00
parent 1b224d1aaf
commit f6d7485531
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -7597,31 +7597,6 @@ declare some symbols for the Lisp languages.
#'lisp-mode-prettify))
#+end_src
Lets declare also some for Rust:
#+begin_src emacs-lisp
(defun rust-mode-pretty-symbols ()
(push '("fn" . ?𝑓) prettify-symbols-alist)
(push '("struct" . ?Λ) prettify-symbols-alist)
(prettify-symbols-mode -1)
(prettify-symbols-mode 1))
(add-hook 'rustic-mode-hook #'rust-mode-pretty-symbols)
#+end_src
And some for C and C++.
#+begin_src emacs-lisp
(defun c-cpp-mode-pretty-symbols ()
(push '("int" . ?) prettify-symbols-alist)
(push '("float" . ?) prettify-symbols-alist)
(push '("#include" . ?⭳) prettify-symbols-alist)
(push '("struct" . ?Λ) prettify-symbols-alist)
(prettify-symbols-mode -1)
(prettify-symbols-mode 1))
(add-hook 'c-mode-hook #'c-cpp-mode-pretty-symbols)
(add-hook 'c++-mode-hook #'c-cpp-mode-pretty-symbols)
#+end_src
Finally, similar to how ~org-appear~ behaves, lets show the real string
of our symbols when the cursor is on it.
#+begin_src emacs-lisp