[Top][All Lists]

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

bug#4347: Bug for .emacs.d?

From: Stefan Monnier
Subject: bug#4347: Bug for .emacs.d?
Date: Fri, 11 Sep 2009 16:23:14 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

>> The build of current CVS creates the empty directory '~/.emacs.d', each time
>> one starts Emacs, even if in the '.emacs' file there is

Just so I understand better: is the problem that ~/.emacs.d is created
at build-time, or that it's created at run-time?

IIUC it's done both times right now.  The build-time case is a bug
(which I think should be fixed along the lines of the patch below), but
w.r.t the run-time case, I'm not convinced it's a bug.


Index: lisp/abbrev.el
RCS file: /sources/emacs/emacs/lisp/abbrev.el,v
retrieving revision 1.83
diff -u -r1.83 abbrev.el
--- lisp/abbrev.el      29 Aug 2009 19:22:44 -0000      1.83
+++ lisp/abbrev.el      11 Sep 2009 20:20:26 -0000
@@ -40,7 +40,8 @@
 (defcustom abbrev-file-name
   (locate-user-emacs-file "abbrev_defs" ".abbrev_defs")
-  "Default name of file to read abbrevs from."
+  "Default name of file from which to read abbrevs."
+  :initialize 'custom-initialize-delay
   :type 'file)
 (defcustom only-global-abbrevs nil
Index: lisp/custom.el
RCS file: /sources/emacs/emacs/lisp/custom.el,v
retrieving revision 1.146
diff -u -r1.146 custom.el
--- lisp/custom.el      5 Jan 2009 03:18:51 -0000       1.146
+++ lisp/custom.el      11 Sep 2009 20:20:27 -0000
@@ -130,6 +119,17 @@
         (set-default symbol (eval value)))))
+(defvar custom-delayed-init-variables nil
+  "List of variables whose initialization is pending.")
+(defun custom-initialize-delay (symbol value)
+  "Delay initialization of SYMBOL to the next Emacs start.
+This is used in files that are preloaded, so that the initialization is
+done in the run-time context rather than the build-time context.
+SYMBOL is temporarily initialized to nil."
+  (set symbol nil)
+  (push symbol custom-delayed-init-variables))
 (defun custom-declare-variable (symbol default doc &rest args)
   "Like `defcustom', but SYMBOL and DEFAULT are evaluated as normal arguments.
 DEFAULT should be an expression to evaluate to compute the default value,
Index: lisp/files.el
RCS file: /sources/emacs/emacs/lisp/files.el,v
retrieving revision 1.1080
diff -u -r1.1080 files.el
--- lisp/files.el       7 Sep 2009 15:23:12 -0000       1.1080
+++ lisp/files.el       11 Sep 2009 20:20:31 -0000
@@ -204,6 +204,7 @@
 by programs that create small temporary files.  This is for systems that
 have fast storage with limited space, such as a RAM disk."
   :group 'files
+  :initialize 'custom-initialize-delay
   :type '(choice (const nil) directory))
 ;; The system null device. (Should reference NULL_DEVICE from C.)
@@ -385,6 +386,7 @@
   :group 'auto-save
   :type '(repeat (list (string :tag "Regexp") (string :tag "Replacement")
                                           (boolean :tag "Uniquify")))
+  :initialize 'custom-initialize-delay
   :version "21.1")
 (defcustom save-abbrevs t

reply via email to

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