mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
* lisp/custom.el (custom-add-choice): Fix previous commit.
This commit is contained in:
parent
444e404325
commit
3b04d39c3c
1 changed files with 2 additions and 2 deletions
|
|
@ -1544,7 +1544,7 @@ This means reset VARIABLE. (The argument IGNORED is ignored)."
|
||||||
(defun custom-add-choice (variable choice)
|
(defun custom-add-choice (variable choice)
|
||||||
"Add CHOICE to the custom type of VARIABLE.
|
"Add CHOICE to the custom type of VARIABLE.
|
||||||
If a choice with the same tag already exists, no action is taken."
|
If a choice with the same tag already exists, no action is taken."
|
||||||
(let ((choices (get 'tab-bar-new-tab-choice 'custom-type)))
|
(let ((choices (get variable 'custom-type)))
|
||||||
(unless (eq (car choices) 'choice)
|
(unless (eq (car choices) 'choice)
|
||||||
(error "Not a choice type: %s" choices))
|
(error "Not a choice type: %s" choices))
|
||||||
(unless (seq-find (lambda (elem)
|
(unless (seq-find (lambda (elem)
|
||||||
|
|
@ -1553,7 +1553,7 @@ If a choice with the same tag already exists, no action is taken."
|
||||||
(cdr choices))
|
(cdr choices))
|
||||||
;; Put the new choice at the end.
|
;; Put the new choice at the end.
|
||||||
(put variable 'custom-type
|
(put variable 'custom-type
|
||||||
(append (get variable 'custom-type) (list choice))))))
|
(append choices (list choice))))))
|
||||||
|
|
||||||
;;; The End.
|
;;; The End.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue