From bc3c35c0b623aef8db7a1eb61f11308825ca1940 Mon Sep 17 00:00:00 2001 From: James Cherti <60946298+jamescherti@users.noreply.github.com> Date: Sun, 2 Mar 2025 20:46:55 -0500 Subject: [PATCH] Update README.md --- README.md | 43 +++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 9613fb1..11f97da 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,6 @@ The author uses *minimal-emacs.d* as his `early-init.el` and `init.el`, alongsid - [Customizations](#customizations) - [Never modify init.el and early-init.el. Modify these instead...](#never-modify-initel-and-early-initel-modify-these-instead) - [How to enable the menu-bar, the tool-bar, dialogs, the contextual menu, and tooltips?](#how-to-enable-the-menu-bar-the-tool-bar-dialogs-the-contextual-menu-and-tooltips) - - [Compile-Angel - Speed up Emacs by Automatically Byte-compiling and Native-compiling all .el files](#compile-angel---speed-up-emacs-by-automatically-byte-compiling-and-native-compiling-all-el-files) - [Reducing clutter in `~/.emacs.d` by redirecting files to `~/emacs.d/var/`](#reducing-clutter-in-emacsd-by-redirecting-files-to-emacsdvar) - [How to prevent minimal-emacs.d from saving custom.el?](#how-to-prevent-minimal-emacsd-from-saving-customel) - [How to activate recentf, savehist, saveplace, and auto-revert?](#how-to-activate-recentf-savehist-saveplace-and-auto-revert) @@ -129,27 +128,6 @@ To customize your Emacs setup to include various user interface elements, you ca These settings control the visibility of dialogs, context menus, toolbars, menu bars, and tooltips. -### Compile-Angel - Speed up Emacs by Automatically Byte-compiling and Native-compiling all .el files - -The [compile-angel.el](https://github.com/jamescherti/compile-angel.el) ensures all libraries are byte-compiled and native-compiled**. Byte-compilation reduces the overhead of loading Emacs Lisp code at runtime, while native compilation optimizes performance by generating machine code specific to your system. - -To install compile-angel, add the following code **at the very beginning of your `~/.emacs.d/post-init.el` file, before all other packages**: -```emacs-lisp -(use-package compile-angel - :ensure t - :demand t - :config - ;; Set `compile-angel-verbose` to nil to suppress output from compile-angel. - ;; Drawback: The minibuffer will not display compile-angel's actions. - (setq compile-angel-verbose t) - - ;; A local mode that compiles .el files whenever the user saves them. - ;; (add-hook 'emacs-lisp-mode-hook #'compile-angel-on-save-local-mode) - - ;; A global mode that compiles .el files before they are loaded. - (compile-angel-on-load-mode)) -``` - ### Reducing clutter in `~/.emacs.d` by redirecting files to `~/emacs.d/var/` Emacs, by default, stores various configuration files, caches, backups, and other data in the `~/.emacs.d` directory. Over time, this directory can become cluttered with numerous files, making it difficult to manage and maintain. @@ -203,9 +181,26 @@ The recentf, savehist, saveplace, and auto-revert built-in packages are already ### Optimization: Native Compilation -Check if native compilation is enabled by evaluating `(native-comp-available-p)` in Emacs. If the result is non-nil, it indicates that native compilation is active. +Native compilation can greatly enhance performance by translating Emacs Lisp code into native machine code, leading to faster execution and improved responsiveness. Check if native compilation is enabled by evaluating `(native-comp-available-p)` in Emacs. If the result is non-nil, it indicates that native compilation is active. -Native compilation can greatly enhance performance by translating Emacs Lisp code into native machine code, leading to faster execution and improved responsiveness. +Also, ensures all libraries are byte-compiled and native-compiled using [compile-angel.el](https://github.com/jamescherti/compile-angel.el). + +To install compile-angel, add the following code **at the very beginning of your `~/.emacs.d/post-init.el` file, before all other packages**: +```emacs-lisp +(use-package compile-angel + :ensure t + :demand t + :config + ;; Set `compile-angel-verbose` to nil to suppress output from compile-angel. + ;; Drawback: The minibuffer will not display compile-angel's actions. + (setq compile-angel-verbose t) + + ;; A local mode that compiles .el files whenever the user saves them. + ;; (add-hook 'emacs-lisp-mode-hook #'compile-angel-on-save-local-mode) + + ;; A global mode that compiles .el files before they are loaded. + (compile-angel-on-load-mode)) +``` ### Code completion with corfu