summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/checkdoc.el3
-rw-r--r--lisp/emacs-lisp/eieio.el3
2 files changed, 2 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index aadd6480086..3c4b6baca53 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -2042,8 +2042,7 @@ from the comment."
(condition-case nil
(setq lst (read (current-buffer)))
(error (setq lst nil))) ; error in text
- (if (not (listp lst)) ; not a list of args
- (setq lst (list lst)))
+ (setq lst (ensure-list lst))
(if (and lst (not (symbolp (car lst)))) ;weird arg
(setq lst nil))
(while lst
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 9a1f5b9db0f..ccdb52d6a1f 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -652,8 +652,7 @@ If SLOT is unbound, bind it to the list containing ITEM."
(setq ov (list item))
(setq ov (eieio-oref object slot))
;; turn it into a list.
- (unless (listp ov)
- (setq ov (list ov)))
+ (setq ov (ensure-list ov))
;; Do the combination
(if (not (member item ov))
(setq ov