DarlingEffect

joined 1 year ago
 

What's the best practice to have your custom elisp natively compiled, along with external packages?

So far I've only succeeded by doing the following:

  • Move my custom elisp to a new file (emacs-lib.el) which starts with (provide 'emacs-lib)

  • Manually run emacs-lisp-native-compile-and-load while visiting that file

  • Change my init file to load the library:

    (setq elisp-dir "~/config/elisp") (add-to-list 'load-path elisp-dir) (require 'emacs-lib)

After restarting Emacs, I've checked that many of my custom functions are indeed native-compiled.

It would be nice if I could have my init file take care of compiling the library when missing or outdated. Even better if I didn't need the separate file, but that's no big deal.

 

I just configured eglot for C++ using clangd, and my eldoc buffers include some spurious characters rendered as two highlighted underscores after each symbol ( e.g., "Foo__"): https://i.imgur.com/Snqt9JA.png

If I copy them to another buffer, they turn out to be a backtick followed by two spaces: "` ".

Does anybody know how to get rid of them?

I tried downloading the latest eglot (rather than using the one that comes with Emacs 29) and setting 'eglot-prefer-plaintext' to 't', but this got rid of all syntax highlighting.