diff options
| author | Lars Ingebrigtsen | 2019-06-16 15:53:03 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-06-16 15:53:03 +0200 |
| commit | 0c2b747d26fd8d2ee0398db3c1c415caf70f4bbe (patch) | |
| tree | 1a163c6c4edf89fd8dad3b26832cbdf5ad533c0b | |
| parent | 59821926204e59d0db021591db4c05e3571d2465 (diff) | |
| download | emacs-0c2b747d26fd8d2ee0398db3c1c415caf70f4bbe.tar.gz emacs-0c2b747d26fd8d2ee0398db3c1c415caf70f4bbe.zip | |
Avoid "unknown slot" compilation warning in eieio-custom
* lisp/emacs-lisp/eieio-custom.el
(eieio-read-customization-group): Slot `name' may not exist in all
classes, so protect against that (and avoid a compilation warning
about it).
| -rw-r--r-- | lisp/emacs-lisp/eieio-custom.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/eieio-custom.el b/lisp/emacs-lisp/eieio-custom.el index e018883b442..c9a8129a45e 100644 --- a/lisp/emacs-lisp/eieio-custom.el +++ b/lisp/emacs-lisp/eieio-custom.el | |||
| @@ -466,8 +466,13 @@ Return the symbol for the group, or nil" | |||
| 466 | ;; Make the association list | 466 | ;; Make the association list |
| 467 | (setq g (mapcar (lambda (g) (cons (symbol-name g) g)) g)) | 467 | (setq g (mapcar (lambda (g) (cons (symbol-name g) g)) g)) |
| 468 | (cdr (assoc | 468 | (cdr (assoc |
| 469 | (completing-read (concat (oref obj name) " Custom Group: ") | 469 | (completing-read |
| 470 | g nil t nil 'eieio-read-custom-group-history) | 470 | (concat |
| 471 | (if (slot-exists-p obj 'name) | ||
| 472 | (concat (slot-value obj (intern "name" obarray)) "") | ||
| 473 | "") | ||
| 474 | "Custom Group: ") | ||
| 475 | g nil t nil 'eieio-read-custom-group-history) | ||
| 471 | g))))) | 476 | g))))) |
| 472 | 477 | ||
| 473 | (provide 'eieio-custom) | 478 | (provide 'eieio-custom) |