emacs-devel
[Top][All Lists]
Advanced

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

Re: Use .emacs.d in savehist.el


From: Richard M. Stallman
Subject: Re: Use .emacs.d in savehist.el
Date: Sun, 30 Oct 2005 20:14:15 -0500

          ;; This tells `load' to store the file name found
          ;; into user-init-file.
          (setq user-init-file t)
          (load user-init-file-1 t t)

    If the `load' function succeeds, it automagically binds
    `user-init-file' to the loaded filename.  I don't know why this was
    written this way, but maybe there is a reason?

The reason is to record the actual name found, whether it be .emacs or
.emacs.el, or whatever.

We need the actual file name, not just something that we could
pass to `load' and load the same file.

    Also, if you want to use this function for the init file, you would
    have to account for the "_emacs" dotfile name used on MS-DOS and
    MS-Windows.  In particular, MS-Windows uses "~/.emacs" by default, but
    if that is not available it accepts "~/_emacs" as the dotfile.

That particular case does seem to needs special code.
It is no big deal if the one case of .emacs can't use the
general function (but it would be nice if it could).

    Another note: it seems to me that most libraries that use ".emacs.d"
    look for it in "~".  Would it make sense to extend the
    `init-file-user' variable so that the directory goes into

          (concat "~" init-file-user "/.emacs.d")

Yes!




reply via email to

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