diff options
| author | Miles Bader | 2000-10-29 14:51:24 +0000 |
|---|---|---|
| committer | Miles Bader | 2000-10-29 14:51:24 +0000 |
| commit | dd4d3cb6247087da635d6f370598f206ed9a454e (patch) | |
| tree | 42bf460627943fb5181b35a13de71135868e0ed9 | |
| parent | a62ebc520c3f88d3ce5e56fab8a98d5c27bc7e48 (diff) | |
| download | emacs-dd4d3cb6247087da635d6f370598f206ed9a454e.tar.gz emacs-dd4d3cb6247087da635d6f370598f206ed9a454e.zip | |
(custom-add-to-group): Allow multiple entries for a given value OPTION,
as long as their widget types are different.
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/custom.el | 12 |
2 files changed, 15 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 706751d315a..7ce144dcc86 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2000-10-29 Miles Bader <miles@gnu.org> | ||
| 2 | |||
| 3 | * custom.el (custom-add-to-group): Allow multiple entries for a | ||
| 4 | given value OPTION, as long as their widget types are different. | ||
| 5 | * cus-edit.el (custom-face-value-create): If face name doesn't end | ||
| 6 | with "face", add such here (similar to custom group widgets). | ||
| 7 | |||
| 8 | * comint.el (comint-highlight-prompt): Add :type. | ||
| 9 | |||
| 1 | 2000-10-28 John Wiegley <johnw@gnu.org> | 10 | 2000-10-28 John Wiegley <johnw@gnu.org> |
| 2 | 11 | ||
| 3 | * textmodes/flyspell.el (flyspell-maybe-correct-transposition): | 12 | * textmodes/flyspell.el (flyspell-maybe-correct-transposition): |
diff --git a/lisp/custom.el b/lisp/custom.el index ef0fce7ecb4..ca5948d1ddc 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -319,12 +319,12 @@ information." | |||
| 319 | 319 | ||
| 320 | (defun custom-add-to-group (group option widget) | 320 | (defun custom-add-to-group (group option widget) |
| 321 | "To existing GROUP add a new OPTION of type WIDGET. | 321 | "To existing GROUP add a new OPTION of type WIDGET. |
| 322 | If there already is an entry for that option, overwrite it." | 322 | If there already is an entry for OPTION and WIDGET, nothing is done." |
| 323 | (let* ((members (get group 'custom-group)) | 323 | (let ((members (get group 'custom-group)) |
| 324 | (old (assq option members))) | 324 | (entry (list option widget))) |
| 325 | (if old | 325 | (message "adding %s" entry) |
| 326 | (setcar (cdr old) widget) | 326 | (unless (member entry members) |
| 327 | (put group 'custom-group (nconc members (list (list option widget))))))) | 327 | (put group 'custom-group (nconc members (list entry)))))) |
| 328 | 328 | ||
| 329 | ;;; Properties. | 329 | ;;; Properties. |
| 330 | 330 | ||