bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#66742: 30.0.50; transient-mark-mode is not enabled after re-dumping


From: Gerd Möllmann
Subject: bug#66742: 30.0.50; transient-mark-mode is not enabled after re-dumping Emacs
Date: Thu, 26 Oct 2023 11:11:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Ihor Radchenko <yantar92@posteo.net> writes:

> Steps to reproduce:
>
> 1. ./src/emacs -Q --batch -l ~/Downloads/dump.el 
> With dump.el:
>
> (dump-emacs-portable "/tmp/emacs-dumped.dmp")
>
> 2. ./src/emacs -Q --dump-file="/tmp/emacs-dumped.dmp"
>
> 3. C-<SPC> C-p C-p
>
> Expected: active region is highlighted
> Observed: Transient mark mode is not enabled and thus active region is
>           not highlighted.

Just an analyis.

AFAICS, this one comes from a special handling of some custom variables.
In function command-line, we have

  ;; Re-evaluate predefined variables whose initial value depends on
  ;; the runtime context.  But delay the warning about
  ;; `user-emacs-directory' being inaccessible until after processing
  ;; the init file and the command-line arguments, in case the user
  ;; customized `user-emacs-directory-warning' to nil via those.
  (let ((user-emacs-directory-warning nil))
    (when (listp custom-delayed-init-variables)
      (mapc #'custom-reevaluate-setting
            ;; Initialize them in the same order they were loaded, in
            ;; case there are dependencies between them.
            (reverse custom-delayed-init-variables))))
  (setq custom-delayed-init-variables t)

The list of custom-delayed-init-variables is built by function
custom-initialize-delay. If you grep for that, you'll finds a number of
declarations containing an :initialize with the delaying function.

In a re-dumped Emacs, the variable is not a list, so nothing is done. In
the particular case of transient-mark-mode, the default value, which is
set in C, is nil, so it keeps that value.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]