diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-10-01 21:58:52 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-10-01 21:58:52 -0700 |
commit | 4829a3b033b119b088947d14b73efc197b2547fa (patch) | |
tree | ef9a96d2fa02c559ce69ff3ac9a272af84e5f6e9 /lisp/emacs-lisp | |
parent | ee3024c70d2974b59ecdd04b75d18d7258262e70 (diff) | |
parent | 5172fa02cccaab2500ecf85aaf65b8deed54d42e (diff) | |
download | emacs-4829a3b033b119b088947d14b73efc197b2547fa.tar.gz emacs-4829a3b033b119b088947d14b73efc197b2547fa.tar.bz2 emacs-4829a3b033b119b088947d14b73efc197b2547fa.zip |
Merge from origin/emacs-26
5172fa02cc Prefer HTTPS to HTTP for gnu.org
8cdd8b920a Merge from Gnulib
60b7668b89 Keep eww buffer current when looking up CSS on MDN
bd49b6f1b3 Workaround for faulty localtime() under macOS 10.6
913808e224 Doc amendment for syntax-ppss.
98dc91fda8 Remove incorrect NEWS entry about 'find-library'
539d8626cd Remove inadvertent changes to syntax.texi in last commit.
8c18dcbc78 Amend documentation for text-quoting-style becoming a user...
5f76ac150a Make the value nil in text-quoting-style mean what it does...
d5e4e004fa Make text-quoting-style customizable. Introduce t and new...
1ba3471b9b eshell.texi improvements
7abb5c3960 Fix ns-win.el on GNUstep
07ea5ef99a Fix reference style in org.texi
b03b4f6d79 Improve handling of iconification of child frames (Bug#28611)
ba9139c501 Revert "Don't lose arguments to eshell aliases (Bug#27954)"
43fac3beae Make "unsafe directory" error message more informative (Bu...
c59ddb2120 Fix slot typecheck in eieio-persistent
8b2ab5014b Fix semantic-ia-fast-jump
5b45e7e1c3 Bind vc-region-history
f172894595 Exit macro definition on undefined keys
289fe6c0d1 Reset bidi-paragraph-direction on article rendering
a4f7518817 Fix url-http use of url-current-object
4a755ed421 Avoid assertions in vc-hg.el on MS-Windows
cb93a6ce72 Improve documentation of 'copy-sequence'
200ef6f721 Minor update of ack.texi
cb407d3e87 * doc/emacs/emacs.texi (Acknowledgments): Add more contrib...
82b6c765ff Improve indexing of multi-file/buffer Isearch commands
645ff6c702 Add CAM02 JCh and CAM02-UCS J'a'b' conversions
157007b58e Fix uses of @kindex in the Emacs manual
63a45e8837 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/e...
3ab2f9bbb9 Merge from gnulib
cbc8324488 Prefer HTTPS to HTTP for gnu.org
bbda601d1d ; Spelling fixes
695cf5300b Wait for frame visibility with timeout in w32term too
e1f6e3127a Bring back the busy wait after x_make_frame_visible (Bug#2...
bccf635217 ; * src/gtkutil.c (xg_check_special_colors): Add another G...
f428757cdb Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/e...
26d58f0c58 ; Standardize license notices
73dba0f466 Fix last doc string change in simple.el
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/eieio-base.el | 29 | ||||
-rw-r--r-- | lisp/emacs-lisp/lisp.el | 2 | ||||
-rw-r--r-- | lisp/emacs-lisp/subr-x.el | 2 |
3 files changed, 16 insertions, 17 deletions
diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el index 6b39b4f2622..e3501be6c1d 100644 --- a/lisp/emacs-lisp/eieio-base.el +++ b/lisp/emacs-lisp/eieio-base.el @@ -31,6 +31,7 @@ ;;; Code: (require 'eieio) +(require 'seq) (eval-when-compile (require 'cl-lib)) ;;; eieio-instance-inheritor @@ -308,14 +309,6 @@ Second, any text properties will be stripped from strings." (= (length proposed-value) 1)) nil) - ;; We have a slot with a single object that can be - ;; saved here. Recurse and evaluate that - ;; sub-object. - ((and classtype (class-p classtype) - (child-of-class-p (car proposed-value) classtype)) - (eieio-persistent-convert-list-to-object - proposed-value)) - ;; List of object constructors. ((and (eq (car proposed-value) 'list) ;; 2nd item is a list. @@ -346,6 +339,16 @@ Second, any text properties will be stripped from strings." objlist)) ;; return the list of objects ... reversed. (nreverse objlist))) + ;; We have a slot with a single object that can be + ;; saved here. Recurse and evaluate that + ;; sub-object. + ((and classtype + (seq-some + (lambda (elt) + (child-of-class-p (car proposed-value) elt)) + classtype)) + (eieio-persistent-convert-list-to-object + proposed-value)) (t proposed-value)))) @@ -402,13 +405,9 @@ If no class is referenced there, then return nil." type)) ((eq (car-safe type) 'or) - ;; If type is a list, and is an or, it is possibly something - ;; like (or null myclass), so check for that. - (let ((ans nil)) - (dolist (subtype (cdr type)) - (setq ans (eieio-persistent-slot-type-is-class-p - subtype))) - ans)) + ;; If type is a list, and is an `or', return all valid class + ;; types within the `or' statement. + (seq-filter #'eieio-persistent-slot-type-is-class-p (cdr type))) (t ;; No match, not a class. diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index c3d62fd59bb..c54828e7b43 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -402,7 +402,7 @@ is called as a function to find the defun's beginning." "Return non-nil if the point is in an \"emptyish\" line. This means a line that consists entirely of comments and/or whitespace." -;; See http://lists.gnu.org/archive/html/help-gnu-emacs/2016-08/msg00141.html +;; See https://lists.gnu.org/archive/html/help-gnu-emacs/2016-08/msg00141.html (save-excursion (forward-line 0) (< (line-end-position) diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el index edba6550fa2..5189cc4a6e8 100644 --- a/lisp/emacs-lisp/subr-x.el +++ b/lisp/emacs-lisp/subr-x.el @@ -28,7 +28,7 @@ ;; in subr.el. ;; Do not document these functions in the lispref. -;; http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01006.html +;; https://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01006.html ;; NB If you want to use this library, it's almost always correct to use: ;; (eval-when-compile (require 'subr-x)) |