From 9e81cf1c7ec547098ce7ada260b116a5242bde72 Mon Sep 17 00:00:00 2001 From: Jens Schmidt Date: Wed, 13 Dec 2023 22:11:32 +0100 Subject: [PATCH] ; Remove preload of rmc from loadup.el See discussion on https://lists.gnu.org/archive/html/emacs-devel/2023-12/msg00309.html. * lisp/loadup.el ("emacs-lisp/rmc"): Remove preload. * lisp/files.el (read-multiple-choice): * lisp/simple.el (read-multiple-choice): Declare function. * lisp/loadup.el: Make the warning on advised preloaded functions a tad noisier. --- lisp/files.el | 3 +++ lisp/loadup.el | 5 +---- lisp/simple.el | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index f87e7807301..4ee7614f99a 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2297,6 +2297,9 @@ files--ask-user-about-large-file-help-text op-type op-type)) +(declare-function read-multiple-choice "emacs-lisp/rmc" + (prompt choices &optional help-string show-help long-form)) + (defun files--ask-user-about-large-file (size op-type filename offer-raw) "Query the user about what to do with large files. Files are \"large\" if file SIZE is larger than `large-file-warning-threshold'. diff --git a/lisp/loadup.el b/lisp/loadup.el index 1f959464b23..de1934e9299 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -406,9 +406,6 @@ (message "Warning: Change in load-path due to site-load will be \ lost after dumping"))) -;; Used by `kill-buffer', for instance. -(load "emacs-lisp/rmc") - ;; Actively check for advised functions during preload since: ;; - advices in Emacs's core are generally considered bad style; ;; - `Snarf-documentation' looses docstrings of primitives advised @@ -419,7 +416,7 @@ ;; Don't make it an error because it's not serious enough and ;; it can be annoying during development. Also there are still ;; circumstances where we use advice on preloaded functions. - (message "Warning: Advice installed on preloaded function %S" f)))) + (message "\nWarning: Advice installed on preloaded function %S" f)))) ;; Make sure default-directory is unibyte when dumping. This is ;; because we cannot decode and encode it correctly (since the locale diff --git a/lisp/simple.el b/lisp/simple.el index cee1ddac52f..71cedd6cb17 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -11093,6 +11093,9 @@ scratch-buffer (interactive) (pop-to-buffer-same-window (get-scratch-buffer-create))) +(declare-function read-multiple-choice "emacs-lisp/rmc" + (prompt choices &optional help-string show-help long-form)) + (defun kill-buffer--possibly-save (buffer) "Ask the user to confirm killing of a modified BUFFER. -- 2.30.2