mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-28 10:56:36 +00:00
Revert commit that broke 'make bootstrap'
* lisp/custom.el (custom-declare-variable): Revert commit
79fac080d2
. custom.el needs to work
even when pcase has not been defined yet, when doing bootstrapping.
This commit is contained in:
parent
d8589ad4e3
commit
0afbc5b2a2
@ -155,29 +155,40 @@ set to nil, as the value is no longer rogue."
|
||||
(unless (memq :group args)
|
||||
(custom-add-to-group (custom-current-group) symbol 'custom-variable))
|
||||
(while args
|
||||
(let ((keyword (pop args)))
|
||||
(unless (symbolp keyword)
|
||||
(error "Junk in args %S" (cons keyword args)))
|
||||
(unless args
|
||||
(error "Keyword %s is missing an argument" keyword))
|
||||
(let ((value (pop args)))
|
||||
(pcase keyword
|
||||
(`:initialize (setq initialize value))
|
||||
(`:set (put symbol 'custom-set value))
|
||||
(`:get (put symbol 'custom-get value))
|
||||
(`:require (push value requests))
|
||||
(`:risky (put symbol 'risky-local-variable value))
|
||||
(`:safe (put symbol 'safe-local-variable value))
|
||||
(`:type (put symbol 'custom-type (purecopy value)))
|
||||
(`:options (if (get symbol 'custom-options)
|
||||
;; Slow safe code to avoid duplicates.
|
||||
(mapc (lambda (option)
|
||||
(custom-add-option symbol option))
|
||||
value)
|
||||
;; Fast code for the common case.
|
||||
(put symbol 'custom-options (copy-sequence value))))
|
||||
(_ (custom-handle-keyword symbol keyword value
|
||||
'custom-variable))))))
|
||||
(let ((arg (car args)))
|
||||
(setq args (cdr args))
|
||||
(unless (symbolp arg)
|
||||
(error "Junk in args %S" args))
|
||||
(let ((keyword arg)
|
||||
(value (car args)))
|
||||
(unless args
|
||||
(error "Keyword %s is missing an argument" keyword))
|
||||
(setq args (cdr args))
|
||||
(cond ((eq keyword :initialize)
|
||||
(setq initialize value))
|
||||
((eq keyword :set)
|
||||
(put symbol 'custom-set value))
|
||||
((eq keyword :get)
|
||||
(put symbol 'custom-get value))
|
||||
((eq keyword :require)
|
||||
(push value requests))
|
||||
((eq keyword :risky)
|
||||
(put symbol 'risky-local-variable value))
|
||||
((eq keyword :safe)
|
||||
(put symbol 'safe-local-variable value))
|
||||
((eq keyword :type)
|
||||
(put symbol 'custom-type (purecopy value)))
|
||||
((eq keyword :options)
|
||||
(if (get symbol 'custom-options)
|
||||
;; Slow safe code to avoid duplicates.
|
||||
(mapc (lambda (option)
|
||||
(custom-add-option symbol option))
|
||||
value)
|
||||
;; Fast code for the common case.
|
||||
(put symbol 'custom-options (copy-sequence value))))
|
||||
(t
|
||||
(custom-handle-keyword symbol keyword value
|
||||
'custom-variable))))))
|
||||
(put symbol 'custom-requests requests)
|
||||
;; Do the actual initialization.
|
||||
(unless custom-dont-initialize
|
||||
|
Loading…
Reference in New Issue
Block a user