emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/lisp ChangeLog abbrev.el custom.el startu...


From: Stefan Monnier
Subject: [Emacs-diffs] emacs/lisp ChangeLog abbrev.el custom.el startu...
Date: Fri, 11 Sep 2009 21:25:48 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        09/09/11 21:25:47

Modified files:
        lisp           : ChangeLog abbrev.el custom.el startup.el 

Log message:
        * custom.el (custom-delayed-init-variables): New var.
        (custom-initialize-delay): New function.
        * startup.el (command-line): "Re"evaluate all vars in
        custom-delayed-init-variables.  Don't reevaluate abbrev-file-name
        explicitly any more.
        * abbrev.el (abbrev-file-name): Use custom-initialize-delay
        to avoid creating a ~/.emacs.d at build-time (bug#4347).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16133&r2=1.16134
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/abbrev.el?cvsroot=emacs&r1=1.83&r2=1.84
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/custom.el?cvsroot=emacs&r1=1.146&r2=1.147
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/startup.el?cvsroot=emacs&r1=1.539&r2=1.540

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16133
retrieving revision 1.16134
diff -u -b -r1.16133 -r1.16134
--- ChangeLog   11 Sep 2009 18:54:55 -0000      1.16133
+++ ChangeLog   11 Sep 2009 21:25:44 -0000      1.16134
@@ -1,6 +1,14 @@
 2009-09-11  Stefan Monnier  <address@hidden>
 
-       * proced.el (proced-mode-map): Prefer "m" for proced-mark.
+       * custom.el (custom-delayed-init-variables): New var.
+       (custom-initialize-delay): New function.
+       * startup.el (command-line): "Re"evaluate all vars in
+       custom-delayed-init-variables.  Don't reevaluate abbrev-file-name
+       explicitly any more.
+       * abbrev.el (abbrev-file-name): Use custom-initialize-delay
+       to avoid creating a ~/.emacs.d at build-time (bug#4347).
+
+       * proced.el (proced-mode-map): Prefer "m" for proced-mark (bug#4362).
 
 2009-09-11  Nick Roberts  <address@hidden>
 

Index: abbrev.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/abbrev.el,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -b -r1.83 -r1.84
--- abbrev.el   29 Aug 2009 19:22:44 -0000      1.83
+++ abbrev.el   11 Sep 2009 21:25:47 -0000      1.84
@@ -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: custom.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/custom.el,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -b -r1.146 -r1.147
--- custom.el   5 Jan 2009 03:18:51 -0000       1.146
+++ custom.el   11 Sep 2009 21:25:47 -0000      1.147
@@ -130,6 +130,17 @@
        (t
         (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.
+This also has the side-effect that the (delayed) initialization is performed
+with the :setter."
+  (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: startup.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/startup.el,v
retrieving revision 1.539
retrieving revision 1.540
diff -u -b -r1.539 -r1.540
--- startup.el  11 Sep 2009 00:59:04 -0000      1.539
+++ startup.el  11 Sep 2009 21:25:47 -0000      1.540
@@ -703,7 +703,6 @@
   (custom-reevaluate-setting 'temporary-file-directory)
   (custom-reevaluate-setting 'small-temporary-file-directory)
   (custom-reevaluate-setting 'auto-save-file-name-transforms)
-  (custom-reevaluate-setting 'abbrev-file-name)
   ;; Force recomputation, in case it was computed during the dump.
   (setq abbreviated-home-dir nil)
 
@@ -909,6 +908,14 @@
       ;; Otherwise, enable tool-bar-mode.
       (tool-bar-mode 1)))
 
+  ;; Re-evaluate predefined variables whose initial value depends on
+  ;; the runtime context.
+  (mapc 'custom-reevaluate-setting
+        ;; Initialize them in the same order they were loaded, in case there
+        ;; are dependencies between them.
+        (prog1 (nreverse custom-delayed-init-variables)
+          (setq custom-delayed-init-variables nil)))
+  
   ;; Can't do this init in defcustom because the relevant variables
   ;; are not set.
   (custom-reevaluate-setting 'blink-cursor-mode)




reply via email to

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