mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-24 06:20:43 -08:00
Merge branch 'master' into feature/igc
This commit is contained in:
commit
f173734251
60 changed files with 1605 additions and 261 deletions
|
|
@ -1454,13 +1454,19 @@ when printing the error message."
|
|||
(env (cdr (assq name list))))
|
||||
(or env
|
||||
(let ((fn name))
|
||||
(while (and (symbolp fn)
|
||||
(fboundp fn)
|
||||
(or (symbolp (symbol-function fn))
|
||||
(consp (symbol-function fn))
|
||||
(while
|
||||
(and (symbolp fn)
|
||||
(fboundp fn)
|
||||
(let ((s (symbol-function fn)))
|
||||
(and
|
||||
(or (symbolp s)
|
||||
(consp s)
|
||||
(and (not macro-p)
|
||||
(compiled-function-p (symbol-function fn)))))
|
||||
(setq fn (symbol-function fn)))
|
||||
(or (closurep s)
|
||||
(compiled-function-p s))))
|
||||
(progn
|
||||
(setq fn s)
|
||||
t)))))
|
||||
(let ((advertised (get-advertised-calling-convention
|
||||
(if (and (symbolp fn) (fboundp fn))
|
||||
;; Could be a subr.
|
||||
|
|
@ -1471,7 +1477,8 @@ when printing the error message."
|
|||
(if macro-p
|
||||
`(macro lambda ,advertised)
|
||||
`(lambda ,advertised)))
|
||||
((and (not macro-p) (compiled-function-p fn)) fn)
|
||||
((and (not macro-p) (or (closurep fn) (compiled-function-p fn)))
|
||||
fn)
|
||||
((not (consp fn)) nil)
|
||||
((eq 'macro (car fn)) (cdr fn))
|
||||
(macro-p nil)
|
||||
|
|
|
|||
|
|
@ -336,9 +336,13 @@ Return them as multiple value."
|
|||
(nreverse res))))
|
||||
|
||||
(defun comp-supertypes (type)
|
||||
"Return the ordered list of supertypes of TYPE."
|
||||
(or (assq type (comp-cstr-ctxt-typeof-types comp-ctxt))
|
||||
(error "Type %S missing from typeof-types!" type)))
|
||||
"Return the ordered list of supertypes of TYPE."
|
||||
(or (assq type (comp-cstr-ctxt-typeof-types comp-ctxt))
|
||||
(progn
|
||||
(display-warning
|
||||
'native-compiler
|
||||
(format "Unknown type %S" type))
|
||||
'(t))))
|
||||
|
||||
(defun comp--union-typesets (&rest typesets)
|
||||
"Union types present into TYPESETS."
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ default setting for optimization purposes.")
|
|||
"If nil, drop support for some behaviors of older versions of EIEIO.
|
||||
Currently under control of this var:
|
||||
- Define every class as a var whose value is the class symbol.
|
||||
- Define <class>-child-p and <class>-list-p predicates.
|
||||
- Define <class>-child-p predicate.
|
||||
- Allow object names in constructors.
|
||||
When `warn', also emit warnings at run-time when code uses those
|
||||
deprecated features.")
|
||||
|
|
@ -224,8 +224,7 @@ It creates an autoload function for CNAME's constructor."
|
|||
(autoload cname filename doc nil nil)
|
||||
(autoload (intern (format "%s-p" cname)) filename "" nil nil)
|
||||
(when eieio-backward-compatibility
|
||||
(autoload (intern (format "%s-child-p" cname)) filename "" nil nil)
|
||||
(autoload (intern (format "%s-list-p" cname)) filename "" nil nil)))))
|
||||
(autoload (intern (format "%s-child-p" cname)) filename "" nil nil)))))
|
||||
|
||||
(defun eieio--full-class-object (class)
|
||||
"Like `eieio--class-object' but loads the class if needed."
|
||||
|
|
@ -352,31 +351,6 @@ See `defclass' for more information."
|
|||
(make-obsolete-variable cname (format "use '%s instead" cname)
|
||||
"25.1"))
|
||||
|
||||
;; Create a handy list of the class test too
|
||||
(when eieio-backward-compatibility
|
||||
(let ((csym (intern (concat (symbol-name cname) "-list-p"))))
|
||||
(defalias csym
|
||||
(lambda (obj)
|
||||
(:documentation
|
||||
(internal--format-docstring-line
|
||||
"Test OBJ to see if it a list of objects which are a child of type `%s'."
|
||||
cname))
|
||||
(when (eq eieio-backward-compatibility 'warn)
|
||||
(message "Use of obsolete function %S" csym))
|
||||
(when (listp obj)
|
||||
(let ((ans t)) ;; nil is valid
|
||||
;; Loop over all the elements of the input list, test
|
||||
;; each to make sure it is a child of the desired object class.
|
||||
(while (and obj ans)
|
||||
(setq ans (and (eieio-object-p (car obj))
|
||||
(object-of-class-p (car obj) 'cname)))
|
||||
(setq obj (cdr obj)))
|
||||
ans))))
|
||||
(make-obsolete csym (format
|
||||
"use (cl-typep ... '(list-of %s)) instead"
|
||||
cname)
|
||||
"25.1")))
|
||||
|
||||
;; Store the new class vector definition into the symbol. We need to
|
||||
;; do this first so that we can call defmethod for the accessor.
|
||||
;; The vector will be updated by the following while loop and will not
|
||||
|
|
|
|||
|
|
@ -2399,7 +2399,7 @@ SELECTOR; the default t means run all the defined tests."
|
|||
|
||||
(define-button-type 'ert--results-progress-bar-button
|
||||
'action #'ert--results-progress-bar-button-action
|
||||
'help-echo "mouse-2, RET: Reveal test result")
|
||||
'help-echo #'ert--results-progress-bar-button-help-echo)
|
||||
|
||||
(define-button-type 'ert--test-name-button
|
||||
'action #'ert--test-name-button-action
|
||||
|
|
@ -2628,6 +2628,15 @@ definition."
|
|||
(goto-char (ert--button-action-position))
|
||||
(ert-results-jump-between-summary-and-result))
|
||||
|
||||
(defun ert--results-progress-bar-button-help-echo (_window object pos)
|
||||
"Show the test name in `help-echo'."
|
||||
(format
|
||||
"%s\nmouse-2, RET: Reveal test result"
|
||||
(with-current-buffer object
|
||||
(save-excursion
|
||||
(goto-char pos)
|
||||
(or (ert-test-at-point) "")))))
|
||||
|
||||
(defun ert-results-rerun-all-tests ()
|
||||
"Re-run all tests, using the same selector.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue