[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master d68ed15: Implement and document XDG-style start
From: |
Stefan Monnier |
Subject: |
Re: [Emacs-diffs] master d68ed15: Implement and document XDG-style startup files under ~/.config. |
Date: |
Sun, 26 May 2019 18:40:10 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> -;;; startup.el --- process Emacs shell arguments -*- lexical-binding: t -*-
> +;; startup.el --- process Emacs shell arguments -*- lexical-binding: t -*-
This is an error, it should be 3 semi-colons.
> +(defun find-init-path (fn)
> + "Look in ~/.config/FOO or ~/.FOO for the dotfile or dot directory FOO.
> +It is expected that the output will undergo ~ expansion. Implements the
> +XDG convention for dotfiles."
> + (let* ((xdg-path (concat "~" init-file-user "/.config/" fn))
> + (oldstyle-path (concat "~" init-file-user "/." fn))
> + (found-path (if (file-exists-p xdg-path) xdg-path oldstyle-path)))
> + found-path))
AFAICT this is only used during startup and hence shouldn't have such
an "official sounding" name. It could/should use a "startup--" prefix,
for example.
Furthermore it shouldn't say "path" but "filename" to follow our
naming convention.
Stefan