emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 0c2b747 2/5: Avoid "unknown slot" compilation warni


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 0c2b747 2/5: Avoid "unknown slot" compilation warning in eieio-custom
Date: Sun, 16 Jun 2019 10:10:12 -0400 (EDT)

branch: master
commit 0c2b747d26fd8d2ee0398db3c1c415caf70f4bbe
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    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).
---
 lisp/emacs-lisp/eieio-custom.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lisp/emacs-lisp/eieio-custom.el b/lisp/emacs-lisp/eieio-custom.el
index e018883..c9a8129 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"
       ;; Make the association list
       (setq g (mapcar (lambda (g) (cons (symbol-name g) g)) g))
       (cdr (assoc
-           (completing-read (concat (oref obj name)  " Custom Group: ")
-                            g nil t nil 'eieio-read-custom-group-history)
+           (completing-read
+             (concat
+              (if (slot-exists-p obj 'name)
+                  (concat (slot-value obj (intern "name" obarray)) "")
+                "")
+              "Custom Group: ")
+            g nil t nil 'eieio-read-custom-group-history)
            g)))))
 
 (provide 'eieio-custom)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]