emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 r116836: Fix keyword argument parsing. Please boo


From: Daniel Colascione
Subject: [Emacs-diffs] emacs-24 r116836: Fix keyword argument parsing. Please bootstrap.
Date: Sun, 23 Mar 2014 06:00:46 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116836
revision-id: address@hidden
parent: address@hidden
committer: Daniel Colascione <address@hidden>
branch nick: emacs-24
timestamp: Sat 2014-03-22 23:00:18 -0700
message:
  Fix keyword argument parsing. Please bootstrap.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/emacs-lisp/cl-macs.el     clmacs.el-20091113204419-o5vbwnq5f7feedwu-612
  test/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-8588
  test/automated/cl-lib.el       cllib.el-20130711160611-o23w1tyz0y13jq8e-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-03-23 00:08:47 +0000
+++ b/lisp/ChangeLog    2014-03-23 06:00:18 +0000
@@ -1,3 +1,10 @@
+2014-03-23  Daniel Colascione  <address@hidden>
+
+       * emacs-lisp/cl-macs.el (cl--do-arglist): Use a little `cl-loop'
+       list to look for keyword arguments instead of `memq', fixing
+       (Bug#3647) --- unfortunately, only for freshly-compiled code.
+       Please make bootstrap.
+
 2014-03-23  Richard Stallman  <address@hidden>
 
        * battery.el (battery-linux-sysfs): Search for each field

=== modified file 'lisp/emacs-lisp/cl-macs.el'
--- a/lisp/emacs-lisp/cl-macs.el        2014-02-21 17:45:26 +0000
+++ b/lisp/emacs-lisp/cl-macs.el        2014-03-23 06:00:18 +0000
@@ -503,7 +503,8 @@
                   (varg (if (consp (car arg)) (cl-cadar arg) (car arg)))
                   (def (if (cdr arg) (cadr arg)
                          (or (car cl--bind-defs) (cadr (assq varg 
cl--bind-defs)))))
-                  (look `(memq ',karg ,restarg)))
+                  (look `(cl-loop for cl--arg on ,restarg by #'cddr
+                               when (eq (car cl--arg) ',karg) return cl--arg)))
              (and def cl--bind-enquote (setq def `',def))
              (if (cddr arg)
                  (let* ((temp (or (nth 2 arg) (make-symbol "--cl-var--")))

=== modified file 'test/ChangeLog'
--- a/test/ChangeLog    2014-03-23 03:26:13 +0000
+++ b/test/ChangeLog    2014-03-23 06:00:18 +0000
@@ -1,3 +1,8 @@
+2014-03-23  Daniel Colascione  <address@hidden>
+
+       * automated/cl-lib.el (cl-lib-keyword-names-versus-values): New
+       test: correct parsing of keyword arguments.
+
 2014-03-23  Dmitry Gutov  <address@hidden>
 
        * automated/package-test.el (package-test-describe-package):

=== modified file 'test/automated/cl-lib.el'
--- a/test/automated/cl-lib.el  2014-01-01 07:43:34 +0000
+++ b/test/automated/cl-lib.el  2014-03-23 06:00:18 +0000
@@ -195,4 +195,10 @@
   (should (eql (cl-mismatch "Aa" "aA") 0))
   (should (eql (cl-mismatch '(a b c) '(a b d)) 2)))
 
+(ert-deftest cl-lib-keyword-names-versus-values ()
+  (should (equal
+           (funcall (cl-function (lambda (&key a b) (list a b)))
+                    :b :a :a 42)
+           '(42 :a))))
+
 ;;; cl-lib.el ends here


reply via email to

[Prev in Thread] Current Thread [Next in Thread]