commit fbda511ab8069d0115eafca411a43353b85431b1 (HEAD, refs/remotes/origin/master) Author: Leo Liu Date: Thu May 14 11:18:54 2015 +0800 Fix cps--gensym * lisp/emacs-lisp/generator.el (cps--gensym): Fix. diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el index 8251682..65def39 100644 --- a/lisp/emacs-lisp/generator.el +++ b/lisp/emacs-lisp/generator.el @@ -90,7 +90,7 @@ ;; Change this function to use `cl-gensym' if you want the generated ;; code to be easier to read and debug. ;; (cl-gensym (apply #'format fmt args)) - `(make-symbol ,fmt)) + `(make-symbol (format ,fmt . ,args))) (defvar cps--dynamic-wrappers '(identity) "List of transformer functions to apply to atomic forms we commit 912d4a4935c2ef0854df2b709ccd00710415ff1d Author: Glenn Morris Date: Wed May 13 19:02:31 2015 -0400 Fix bootstrap (void function cl-member). * lisp/emacs-lisp/cl-lib.el: Load cl-seq if no cl-loaddefs file. * lisp/emacs-lisp/cl-seq.el: Provide a feature. diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el index 6b43c12..b6f3a79 100644 --- a/lisp/emacs-lisp/cl-lib.el +++ b/lisp/emacs-lisp/cl-lib.el @@ -731,9 +731,10 @@ If ALIST is non-nil, the new pairs are prepended to it." ;;; Miscellaneous. (provide 'cl-lib) -(or (load "cl-loaddefs" 'noerror 'quiet) - ;; When bootstrapping, cl-loaddefs hasn't been built yet! - (require 'cl-macs)) +(unless (load "cl-loaddefs" 'noerror 'quiet) + ;; When bootstrapping, cl-loaddefs hasn't been built yet! + (require 'cl-macs) + (require 'cl-seq)) ;; Local variables: ;; byte-compile-dynamic: t diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el index 5624acc..3aea67a 100644 --- a/lisp/emacs-lisp/cl-seq.el +++ b/lisp/emacs-lisp/cl-seq.el @@ -1018,4 +1018,6 @@ Atoms are compared by `eql'; cons cells are compared recursively. ;; generated-autoload-file: "cl-loaddefs.el" ;; End: +(provide 'cl-seq) + ;;; cl-seq.el ends here commit 37ab2245f27d83f0faa3c0d9277088433bc4efaf Author: Stefan Monnier Date: Wed May 13 18:39:49 2015 -0400 * lisp/loadup.el ("emacs-lisp/cl-generic"): Preload * src/lisp.mk (lisp): Add emacs-lisp/cl-generic.elc. * lisp/emacs-lisp/cl-generic.el (cl-generic-define-method): Avoid defalias for closures which are not immutable. (cl--generic-prefill-dispatchers): New macro. Use it to prefill the dispatchers table with various entries. * lisp/emacs-lisp/ert.el (emacs-lisp-mode-hook): * lisp/emacs-lisp/seq.el (emacs-lisp-mode-hook): Use add-hook. diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index f6595d3..a2716ef 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -438,7 +438,16 @@ which case this method will be invoked when the argument is `eql' to VAL. ;; the generic function. current-load-list) ;; For aliases, cl--generic-name gives us the actual name. - (defalias (cl--generic-name generic) gfun)))) + (funcall + (if purify-flag + ;; BEWARE! Don't purify this function definition, since that leads + ;; to memory corruption if the hash-tables it holds are modified + ;; (the GC doesn't trace those pointers). + #'fset + ;; But do use `defalias' in the normal case, so that it interacts + ;; properly with nadvice, e.g. for tracing/debug-on-entry. + #'defalias) + (cl--generic-name generic) gfun)))) (defmacro cl--generic-with-memoization (place &rest code) (declare (indent 1) (debug t)) @@ -696,6 +705,25 @@ methods.") (if (eq specializer t) (list cl--generic-t-generalizer) (error "Unknown specializer %S" specializer))) +(defmacro cl--generic-prefill-dispatchers (arg-or-context specializer) + (unless (integerp arg-or-context) + (setq arg-or-context `(&context . ,arg-or-context))) + (unless (fboundp 'cl--generic-get-dispatcher) + (require 'cl-generic)) + (let ((fun (cl--generic-get-dispatcher + `(,arg-or-context ,@(cl-generic-generalizers specializer) + ,cl--generic-t-generalizer)))) + ;; Recompute dispatch at run-time, since the generalizers may be slightly + ;; different (e.g. byte-compiled rather than interpreted). + ;; FIXME: There is a risk that the run-time generalizer is not equivalent + ;; to the compile-time one, in which case `fun' may not be correct + ;; any more! + `(let ((dispatch `(,',arg-or-context + ,@(cl-generic-generalizers ',specializer) + ,cl--generic-t-generalizer))) + ;; (message "Prefilling for %S with \n%S" dispatch ',fun) + (puthash dispatch ',fun cl--generic-dispatchers)))) + (cl-defmethod cl-generic-combine-methods (generic methods) "Standard support for :after, :before, :around, and `:extra NAME' qualifiers." (cl--generic-standard-method-combination generic methods)) @@ -869,17 +897,6 @@ Can only be used from within the lexical body of a primary or around method." 80 (lambda (name) `(gethash (car-safe ,name) cl--generic-head-used)) (lambda (tag) (if (eq (car-safe tag) 'head) (list tag))))) -;; Pre-fill the cl--generic-dispatchers table. -;; We have two copies of `(0 ...)' but we can't share them via `let' because -;; they're not used at the same time (one is compile-time, one is run-time). -(puthash `(0 ,cl--generic-head-generalizer ,cl--generic-t-generalizer) - (eval-when-compile - (unless (fboundp 'cl--generic-get-dispatcher) - (require 'cl-generic)) - (cl--generic-get-dispatcher - `(0 ,cl--generic-head-generalizer ,cl--generic-t-generalizer))) - cl--generic-dispatchers) - (cl-defmethod cl-generic-generalizers :extra "head" (specializer) "Support for the `(head VAL)' specializers." ;; We have to implement `head' here using the :extra qualifier, @@ -890,6 +907,8 @@ Can only be used from within the lexical body of a primary or around method." (gethash (cadr specializer) cl--generic-head-used) specializer) (list cl--generic-head-generalizer))) +(cl--generic-prefill-dispatchers 0 (head eql)) + ;;; Support for (eql ) specializers. (defvar cl--generic-eql-used (make-hash-table :test #'eql)) @@ -904,6 +923,9 @@ Can only be used from within the lexical body of a primary or around method." (puthash (cadr specializer) specializer cl--generic-eql-used) (list cl--generic-eql-generalizer)) +(cl--generic-prefill-dispatchers 0 (eql nil)) +(cl--generic-prefill-dispatchers window-system (eql nil)) + ;;; Support for cl-defstructs specializers. (defun cl--generic-struct-tag (name) @@ -960,6 +982,8 @@ Can only be used from within the lexical body of a primary or around method." (list cl--generic-struct-generalizer)))) (cl-call-next-method))) +(cl--generic-prefill-dispatchers 0 cl--generic-generalizer) + ;;; Dispatch on "system types". (defconst cl--generic-typeof-types @@ -998,6 +1022,8 @@ Can only be used from within the lexical body of a primary or around method." (list cl--generic-typeof-generalizer))) (cl-call-next-method))) +(cl--generic-prefill-dispatchers 0 integer) + ;; Local variables: ;; generated-autoload-file: "cl-loaddefs.el" ;; End: diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 8dc8261..b678e12 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -2537,7 +2537,7 @@ To be used in the ERT results buffer." (add-to-list 'minor-mode-alist '(ert--current-run-stats (:eval (ert--tests-running-mode-line-indicator)))) -(add-to-list 'emacs-lisp-mode-hook 'ert--activate-font-lock-keywords) +(add-hook 'emacs-lisp-mode-hook #'ert--activate-font-lock-keywords) (defun ert--unload-function () "Unload function to undo the side-effects of loading ert.el." @@ -2548,7 +2548,7 @@ To be used in the ERT results buffer." nil) (defvar ert-unload-hook '()) -(add-hook 'ert-unload-hook 'ert--unload-function) +(add-hook 'ert-unload-hook #'ert--unload-function) (provide 'ert) diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el index 5553de6..0aa0f09 100644 --- a/lisp/emacs-lisp/seq.el +++ b/lisp/emacs-lisp/seq.el @@ -442,7 +442,7 @@ If no element is found, return nil." (unless (fboundp 'elisp--font-lock-flush-elisp-buffers) ;; In Emacs≄25, (via elisp--font-lock-flush-elisp-buffers and a few others) ;; we automatically highlight macros. - (add-to-list 'emacs-lisp-mode-hook #'seq--activate-font-lock-keywords)) + (add-hook 'emacs-lisp-mode-hook #'seq--activate-font-lock-keywords)) (provide 'seq) ;;; seq.el ends here diff --git a/lisp/loadup.el b/lisp/loadup.el index 0746f95..828b19e 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -193,6 +193,7 @@ (load "language/cham") (load "indent") +(load "emacs-lisp/cl-generic") (load "frame") (load "startup") (load "term/tty-colors") diff --git a/src/lisp.mk b/src/lisp.mk index ee2a07c..8eb86b7 100644 --- a/src/lisp.mk +++ b/src/lisp.mk @@ -113,6 +113,7 @@ lisp = \ $(lispsource)/language/cham.elc \ $(lispsource)/indent.elc \ $(lispsource)/window.elc \ + $(lispsource)/emacs-lisp/cl-generic.elc \ $(lispsource)/frame.elc \ $(lispsource)/term/tty-colors.elc \ $(lispsource)/font-core.elc \ commit 8d69f38a94fd1584a1ee6fc33f39c8f1ff9eaf59 Author: Eli Zaretskii Date: Wed May 13 20:26:07 2015 +0300 Improve tagging of C bindings in DEFVAR_* * src/Makefile.in (TAGS): Add --regex options to tag the C binding from DEFVAR_*. diff --git a/src/Makefile.in b/src/Makefile.in index 44995a4..1c03b27 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -604,8 +604,10 @@ ctagsfiles3 = [a-zA-Z]*.m TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) $(srcdir)/$(ctagsfiles3) "$(ETAGS)" --include=../lisp/TAGS --include=$(lwlibdir)/TAGS \ --regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/\1/' \ + --regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"[^"]+",[ ]\([A-Za-z0-9_]+\)/\1/' \ $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) \ --regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/\1/' \ + --regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"[^"]+",[ ]\([A-Za-z0-9_]+\)/\1/' \ $(srcdir)/$(ctagsfiles3) ## Arrange to make tags tables for ../lisp and ../lwlib, commit a8a0be4f0eaab3a77cc49cfca017a2d2814a5d1b Author: Glenn Morris Date: Wed May 13 12:38:05 2015 -0400 ; * etc/NEWS: Small edit. diff --git a/etc/NEWS b/etc/NEWS index 3f907db..2888c16 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -554,7 +554,8 @@ and comments. ** VC and related modes *** Basic push support, via `vc-push', bound to `C-x v P'. -Implemented for Bzr, Git, Hg. +Implemented for Bzr, Git, Hg. As part of this change, the pre-existing +(undocumented) command vc-hg-push now behaves slightly differently. *** The new command vc-region-history shows the log+diff of the active region.