]> git.eshelyaron.com Git - emacs.git/commitdiff
Merge remote-tracking branch 'savannah/master' into native-comp
authorAndrea Corallo <akrl@sdf.org>
Wed, 17 Feb 2021 21:26:28 +0000 (22:26 +0100)
committerAndrea Corallo <akrl@sdf.org>
Wed, 17 Feb 2021 21:26:28 +0000 (22:26 +0100)
15 files changed:
1  2 
configure.ac
etc/NEWS
lisp/emacs-lisp/autoload.el
lisp/emacs-lisp/byte-run.el
lisp/emacs-lisp/bytecomp.el
lisp/emacs-lisp/cl-macs.el
lisp/files.el
lisp/gnus/gnus.el
lisp/help-fns.el
lisp/loadup.el
lisp/subr.el
src/data.c
src/eval.c
src/lisp.h
src/pdumper.c

diff --cc configure.ac
Simple merge
diff --cc etc/NEWS
Simple merge
Simple merge
index a3ad43038e742a2594dc4f4217a6866c11bc9b12,76e7f01ace64d8d3b329e39caccd1efebf4ec688..5de7bc6049a1e884da8c720409e5cb1700d38222
@@@ -143,11 -146,18 +146,23 @@@ The return value of this function is no
        (list 'function-put (list 'quote f)
              ''lisp-indent-function (list 'quote val))))
  
 +(defalias 'byte-run--set-speed
 +  #'(lambda (f _args val)
 +      (list 'function-put (list 'quote f)
 +            ''speed (list 'quote val))))
 +
+ (defalias 'byte-run--set-completion
+   #'(lambda (f _args val)
+       (list 'function-put (list 'quote f)
+             ''completion-predicate val)))
+ (defalias 'byte-run--set-modes
+   #'(lambda (f _args &rest val)
+       (list 'function-put (list 'quote f)
+             ''completion-predicate
+             `(lambda (_ b)
+                (command-completion-with-modes-p ',val b)))))
  ;; Add any new entries to info node `(elisp)Declare Form'.
  (defvar defun-declarations-alist
    (list
@@@ -165,7 -175,8 +180,9 @@@ If `error-free', drop calls even if `by
     (list 'compiler-macro #'byte-run--set-compiler-macro)
     (list 'doc-string #'byte-run--set-doc-string)
     (list 'indent #'byte-run--set-indent)
-    (list 'speed #'byte-run--set-speed))
++   (list 'speed #'byte-run--set-speed)
+    (list 'completion #'byte-run--set-completion)
+    (list 'modes #'byte-run--set-modes))
    "List associating function properties to their macro expansion.
  Each element of the list takes the form (PROP FUN) where FUN is
  a function.  For each (PROP . VALUES) in a function's declaration,
index 709a310eb6c6d2007d88649502b9799dbaf88d6f,9d80afd774fd83fd4895e8adfc4b86eef800eb6c..0da7b83791e79fb06d13fa0c406bf08c258a5cb6
@@@ -3069,30 -2991,30 +3072,37 @@@ for symbols generated by the byte compi
                                     reserved-csts)))
        ;; Build the actual byte-coded function.
        (cl-assert (eq 'byte-code (car-safe compiled)))
 -      (apply #'make-byte-code
 -             (if lexical-binding
 -                 (byte-compile-make-args-desc arglist)
 -               arglist)
 -             (append
 -              ;; byte-string, constants-vector, stack depth
 -              (cdr compiled)
 -              ;; optionally, the doc string.
 -              (cond ((and lexical-binding arglist)
 -                     ;; byte-compile-make-args-desc lost the args's names,
 -                     ;; so preserve them in the docstring.
 -                     (list (help-add-fundoc-usage doc arglist)))
 -                    ((or doc int)
 -                     (list doc)))
 -              ;; optionally, the interactive spec (and the modes the
 -              ;; command applies to).
 -              (cond
 -               ;; We have some command modes, so use the vector form.
 -               (command-modes
 -                (list (vector (nth 1 int) command-modes)))
 -               ;; No command modes, use the simple form with just the
 -               ;; interactive spec.
 -               (int
 -                (list (nth 1 int)))))))))
 +      (let ((out
-              (apply #'make-byte-code
-                     (if lexical-binding
-                         (byte-compile-make-args-desc arglist)
-                       arglist)
-                     (append
-                      ;; byte-string, constants-vector, stack depth
-                      (cdr compiled)
-                      ;; optionally, the doc string.
-                      (cond ((and lexical-binding arglist)
-                             ;; byte-compile-make-args-desc lost the args's names,
-                             ;; so preserve them in the docstring.
-                             (list (help-add-fundoc-usage doc arglist)))
-                            ((or doc int)
-                             (list doc)))
-                      ;; optionally, the interactive spec.
-                      (if int
-                          (list (nth 1 int)))))))
-         (when byte-native-compiling
++           (apply #'make-byte-code
++                  (if lexical-binding
++                      (byte-compile-make-args-desc arglist)
++                    arglist)
++                  (append
++                   ;; byte-string, constants-vector, stack depth
++                   (cdr compiled)
++                   ;; optionally, the doc string.
++                   (cond ((and lexical-binding arglist)
++                          ;; byte-compile-make-args-desc lost the args's names,
++                          ;; so preserve them in the docstring.
++                          (list (help-add-fundoc-usage doc arglist)))
++                         ((or doc int)
++                          (list doc)))
++                   ;; optionally, the interactive spec (and the modes the
++                   ;; command applies to).
++                   (cond
++                    ;; We have some command modes, so use the vector form.
++                    (command-modes
++                       (list (vector (nth 1 int) command-modes)))
++                    ;; No command modes, use the simple form with just the
++                    ;; interactive spec.
++                    (int
++                       (list (nth 1 int))))))))
++      (when byte-native-compiling
 +          (setf (byte-to-native-lambda-byte-func
 +                 (gethash (cadr compiled)
 +                          byte-to-native-lambdas-h))
 +                out))
-         out))))
++      out))))
  
  (defvar byte-compile-reserved-constants 0)
  
Simple merge
diff --cc lisp/files.el
Simple merge
Simple merge
Simple merge
diff --cc lisp/loadup.el
Simple merge
diff --cc lisp/subr.el
Simple merge
diff --cc src/data.c
Simple merge
diff --cc src/eval.c
Simple merge
diff --cc src/lisp.h
Simple merge
diff --cc src/pdumper.c
Simple merge