From: Stefan Monnier Date: Wed, 20 Nov 2002 14:35:54 +0000 (+0000) Subject: (custom-declare-variable): Use push. X-Git-Tag: ttn-vms-21-2-B4~12323 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6f0d61bf2ca7bf9d535bd4b2ac062c3dde965574;p=emacs.git (custom-declare-variable): Use push. Use the (defvar . ) format in load-history like `defvar' does. --- diff --git a/lisp/custom.el b/lisp/custom.el index 2fe7c50c13b..7b5fc04718d 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -141,7 +141,7 @@ not the default value itself." ((eq keyword :get) (put symbol 'custom-get value)) ((eq keyword :require) - (setq requests (cons value requests))) + (push value requests)) ((eq keyword :type) (put symbol 'custom-type (purecopy value))) ((eq keyword :options) @@ -149,7 +149,7 @@ not the default value itself." ;; Slow safe code to avoid duplicates. (mapc (lambda (option) (custom-add-option symbol option)) - value) + value) ;; Fast code for the common case. (put symbol 'custom-options (copy-sequence value)))) (t @@ -159,7 +159,7 @@ not the default value itself." ;; Do the actual initialization. (unless custom-dont-initialize (funcall initialize symbol default))) - (setq current-load-list (cons symbol current-load-list)) + (push (cons 'defvar symbol) current-load-list) (run-hooks 'custom-define-hook) symbol)