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

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

bug#45197: Saving customizations makes ~/.config/emacs/init (no .el exte


From: Robert Pluim
Subject: bug#45197: Saving customizations makes ~/.config/emacs/init (no .el extension)
Date: Mon, 14 Dec 2020 18:23:39 +0100

Lars Ingebrigtsen <larsi@gnus.org> writes:

> tsuucat <tsuucat@icloud.com> writes:

> I did not read those 150 messages, and this code is uncommented in
> startup.el:
>
>      (lambda ()
>        (expand-file-name
>         "init"
>         startup-init-directory))
>
> Does anybody know whether this is just a typo?

Iʼm not sure it is. startup--load-user-init-file does this:

              (when (and (eq user-init-file t) alternate-filename-function)
                (let ((alt-file (funcall alternate-filename-function)))
                  (and (equal (file-name-extension alt-file) "el")
                       (setq alt-file (file-name-sans-extension alt-file)))
                  (unless init-file-name
                    (setq init-file-name alt-file))
                  (load alt-file 'noerror 'nomessage)))

which makes me wonder if itʼs trying to cater for people who compile
their init.el file, since this code doesnʼt actually probe the
filesystem, but presumably later we do (load init-file-name), which
will match .elc and .el suffixes.

Robert





reply via email to

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