mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-13 17:40:22 -08:00
Merge from origin/emacs-25
9ba51edDocument buffer-swap-text+save-excursion interaction452aa94Fix eieio vs cl-generic incompatibilities found in Rudel (bug...248d5ddInclude cl-generic in package--builtin-versions (bug#22817)8f5a8b6Improve timing in `tramp-test29-environment-variables'05ba7a0Add test for handling environment variables in Trampe393d4f* lisp/emacs-lisp/package.el (describe-package-1) (package-st...5e38887; * lisp/net/tramp.el: Fix 2010-10-04 comment typo. (Bug#23913)90f2169; Spelling fixes069fc05Improve documentation of search functions0a0144aDelete environment variables in Tramp when neededf624671Add "New in Emacs 25" section to the FAQ658daf9Fix 'vertical-motion' in non-interactive sessions686b520Fix memory leak in imagemagick-types4069b71Update ELisp manual to match 'string-collate-equalp' doc string1b2d6a6Clarify docstring of find-feature-regexpaac62a6Add details to cl-lib defining macros' docstringsd6aa4daClarify doc string of 'save-buffer'03bcf11Un-confuse doc string of 'string-collate-equalp'c53135bClarify documentation of 'mouse-on-link-p' # Conflicts: # lisp/emacs-lisp/eieio-core.el
This commit is contained in:
commit
6b780a2e97
22 changed files with 467 additions and 119 deletions
|
|
@ -86,6 +86,11 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
;; The autoloads.el mechanism which adds package--builtin-versions
|
||||
;; maintenance to loaddefs.el doesn't work for preloaded packages (such
|
||||
;; as this one), so we have to do it by hand!
|
||||
(push (purecopy '(cl-generic 1 0)) package--builtin-versions)
|
||||
|
||||
;; Note: For generic functions that dispatch on several arguments (i.e. those
|
||||
;; which use the multiple-dispatch feature), we always use the same "tagcodes"
|
||||
;; and the same set of arguments on which to dispatch. This works, but is
|
||||
|
|
@ -697,6 +702,15 @@ FUN is the function that should be called when METHOD calls
|
|||
(setq fun (cl-generic-call-method generic method fun)))
|
||||
fun)))))
|
||||
|
||||
(defun cl-generic-apply (generic args)
|
||||
"Like `apply' but takes a cl-generic object rather than a function."
|
||||
;; Handy in cl-no-applicable-method, for example.
|
||||
;; In Common Lisp, generic-function objects are funcallable. Ideally
|
||||
;; we'd want the same in Elisp, but it would either require using a very
|
||||
;; different (and less efficient) representation of cl--generic objects,
|
||||
;; or non-trivial changes in the general infrastructure (compiler and such).
|
||||
(apply (cl--generic-name generic) args))
|
||||
|
||||
(defun cl--generic-arg-specializer (method dispatch-arg)
|
||||
(or (if (integerp dispatch-arg)
|
||||
(nth dispatch-arg
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue