Various improvements
This commit is contained in:
@@ -208,6 +208,11 @@ Add the following to `~/.emacs.d/pre-early-init.el` to ensure that `minimal-emac
|
||||
(setq minimal-emacs-gc-cons-threshold (* 64 1024 1024))
|
||||
```
|
||||
|
||||
### How to change the outline-mode or outline-minor-mode Ellipsis (...) to (▼)?
|
||||
|
||||
|
||||
If you want to to change the outline-mode or outline-minor-mode Ellipsis (...) to (▼), use the code snippet in this article: [Changing the Ellipsis (“…”) in outline-mode and outline-minor-mode](https://www.jamescherti.com/emacs-customize-ellipsis-outline-minor-mode/).
|
||||
|
||||
### How to run the minimal-emacs.d Emacs configuration from another directory?
|
||||
|
||||
To run minimal-emacs.d from a different directory, you can specify the path to your configuration directory using the --init-directory option. For example, to run Emacs with the configuration located in ~/.config/minimal-emacs.d/, use the following command:
|
||||
|
||||
@@ -25,6 +25,11 @@
|
||||
(defvar minimal-emacs--default-user-emacs-directory user-emacs-directory
|
||||
"The default value of the `user-emacs-directory' variable.")
|
||||
|
||||
(setq custom-theme-directory (expand-file-name "themes/" user-emacs-directory))
|
||||
(setq custom-file
|
||||
(expand-file-name "custom.el"
|
||||
minimal-emacs--default-user-emacs-directory))
|
||||
|
||||
(defun minimal-emacs-load-user-init (filename)
|
||||
"Execute a file of Lisp code named FILENAME."
|
||||
(let ((user-init-file
|
||||
@@ -39,8 +44,6 @@
|
||||
|
||||
(set-language-environment "UTF-8")
|
||||
|
||||
(setq custom-theme-directory (expand-file-name "themes/" user-emacs-directory))
|
||||
|
||||
;; Set-language-environment sets default-input-method, which is unwanted.
|
||||
(setq default-input-method nil)
|
||||
|
||||
@@ -230,6 +233,12 @@
|
||||
(when (fboundp 'horizontal-scroll-bar-mode)
|
||||
(horizontal-scroll-bar-mode -1))
|
||||
|
||||
;; Allow for shorter responses: "y" for yes and "n" for no.
|
||||
(if (boundp 'use-short-answers)
|
||||
(setq use-short-answers t)
|
||||
(advice-add #'yes-or-no-p :override #'y-or-n-p))
|
||||
(defalias #'view-hello-file #'ignore) ; Never show the hello file
|
||||
|
||||
;;; package.el
|
||||
;; Since Emacs 27, package initialization occurs before `user-init-file' is
|
||||
;; loaded, but after `early-init-file'.
|
||||
@@ -240,6 +249,9 @@
|
||||
;; Always ensure packages are installed
|
||||
(setq use-package-always-ensure t)
|
||||
|
||||
(setq frame-title-format '("%b – Emacs")
|
||||
icon-title-format frame-title-format)
|
||||
|
||||
;;; Load post-early-init.el
|
||||
(minimal-emacs-load-user-init "post-early-init.el")
|
||||
|
||||
|
||||
42
init.el
42
init.el
@@ -53,24 +53,21 @@
|
||||
(eval-when-compile
|
||||
(require 'use-package))
|
||||
|
||||
;;; Misc
|
||||
|
||||
;;; Minibuffer
|
||||
;; Allow nested minibuffers
|
||||
(setq enable-recursive-minibuffers t)
|
||||
|
||||
(setq custom-file
|
||||
(expand-file-name "custom.el"
|
||||
minimal-emacs--default-user-emacs-directory))
|
||||
|
||||
;; switch-to-buffer runs pop-to-buffer-same-window instead
|
||||
(setq switch-to-buffer-obey-display-actions t)
|
||||
|
||||
;; Keep the cursor out of the read-only portions of the.minibuffer
|
||||
(setq minibuffer-prompt-properties
|
||||
'(read-only t intangible t cursor-intangible t face
|
||||
minibuffer-prompt))
|
||||
(add-hook 'minibuffer-setup-hook #'cursor-intangible-mode)
|
||||
|
||||
;;; Misc
|
||||
|
||||
;; switch-to-buffer runs pop-to-buffer-same-window instead
|
||||
(setq switch-to-buffer-obey-display-actions t)
|
||||
|
||||
(setq show-paren-delay 0.1
|
||||
show-paren-highlight-openparen t
|
||||
show-paren-when-point-inside-paren t
|
||||
@@ -95,6 +92,7 @@
|
||||
compilation-ask-about-save nil
|
||||
compilation-scroll-output 'first-error)
|
||||
|
||||
(setq truncate-string-ellipsis "…")
|
||||
;;; Files
|
||||
|
||||
;; Disable the warning "X and Y are the same file". Ignoring this warning is
|
||||
@@ -199,19 +197,7 @@
|
||||
(when minimal-emacs-savehist-enabled
|
||||
(add-hook 'after-init-hook #'savehist-mode))
|
||||
|
||||
;;; Subr
|
||||
;; Allow for shorter responses: "y" for yes and "n" for no.
|
||||
(if (boundp 'use-short-answers)
|
||||
(setq use-short-answers t)
|
||||
(advice-add #'yes-or-no-p :override #'y-or-n-p))
|
||||
(defalias #'view-hello-file #'ignore) ; Never show the hello file
|
||||
|
||||
;;; Mule-util
|
||||
(setq truncate-string-ellipsis "…")
|
||||
|
||||
;;; Frames and windows
|
||||
(setq frame-title-format '("%b – Emacs")
|
||||
icon-title-format frame-title-format)
|
||||
|
||||
;; Resizing the Emacs frame can be costly when changing the font. Disable this
|
||||
;; to improve startup times with fonts larger than the system default.
|
||||
@@ -223,14 +209,6 @@
|
||||
|
||||
(setq resize-mini-windows 'grow-only)
|
||||
|
||||
;;; Buffer
|
||||
(setq-default left-fringe-width 8)
|
||||
(setq-default right-fringe-width 8)
|
||||
|
||||
;; Do not show an arrow at the top/bottomin the fringe and empty lines
|
||||
(setq-default indicate-buffer-boundaries nil)
|
||||
(setq-default indicate-empty-lines nil)
|
||||
|
||||
;;; Smooth scrolling
|
||||
;; Enables faster scrolling through unfontified regions. This may result in
|
||||
;; brief periods of inaccurate syntax highlighting immediately after scrolling,
|
||||
@@ -278,6 +256,12 @@
|
||||
(setq ring-bell-function #'ignore)
|
||||
|
||||
;;; Indent and formatting
|
||||
(setq-default left-fringe-width 8)
|
||||
(setq-default right-fringe-width 8)
|
||||
|
||||
;; Do not show an arrow at the top/bottomin the fringe and empty lines
|
||||
(setq-default indicate-buffer-boundaries nil)
|
||||
(setq-default indicate-empty-lines nil)
|
||||
|
||||
;; Continue wrapped lines at whitespace rather than breaking in the
|
||||
;; middle of a word.
|
||||
|
||||
Reference in New Issue
Block a user