unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#40766: 27.0.91; Cannot edebug cl-lambda-list edebug spec
@ 2020-04-22 12:58 Philipp Stephani
       [not found] ` <mailman.944.1587560406.3066.bug-gnu-emacs@gnu.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Philipp Stephani @ 2020-04-22 12:58 UTC (permalink / raw)
  To: 40766


emacs -Q
M-x find-library RET cl-macs RET
Navigate to the form `(def-edebug-spec cl-lambda-list ...)'
Hit C-u C-M-x to edebug it.

This results in an error with backtrace:

Debugger entered--Lisp error: (invalid-read-syntax "Expected one of" "nil" edebug-spec-p "t" "0" (&rest edebug-spec))
  signal(invalid-read-syntax ("Expected one of" "nil" edebug-spec-p "t" "0" (&rest edebug-spec)))
  edebug-syntax-error("Expected one of" "nil" edebug-spec-p "t" "0" (&rest edebug-spec))
  apply(edebug-syntax-error ("Expected one of" "nil" edebug-spec-p "t" "0" (&rest edebug-spec)))
  edebug-no-match((((([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or (symbolp &optional def-form) symbolp]] . [&or arg nil]))) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 (6755 . 6766) (6767 . 6772) (6773 . 6784) . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 (6856 . 6863) (6864 . 6873) (6874 . 6882) . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916) "Expected one of" "nil" edebug-spec-p "t" "0" (&rest edebug-spec))
  apply(edebug-no-match (((([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or (symbolp &optional def-form) symbolp]] . [&or arg nil]))) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 (6755 . 6766) (6767 . 6772) (6773 . 6784) . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 (6856 . 6863) (6864 . 6873) (6874 . 6882) . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916) "Expected one of" ("nil" edebug-spec-p "t" "0" (&rest edebug-spec)))
  edebug-match-&or((((([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or (symbolp &optional def-form) symbolp]] . [&or arg nil]))) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 (6755 . 6766) (6767 . 6772) (6773 . 6784) . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 (6856 . 6863) (6864 . 6873) (6874 . 6882) . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916) ("nil" edebug-spec-p "t" "0" (&rest edebug-spec)))
  edebug-match-specs((((([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or (symbolp &optional def-form) symbolp]] . [&or arg nil]))) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 (6755 . 6766) (6767 . 6772) (6773 . 6784) . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 (6856 . 6863) (6864 . 6873) (6874 . 6882) . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916) (&or "nil" edebug-spec-p "t" "0" (&rest edebug-spec)) edebug-match-specs)
  edebug-match-specs((((([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or (symbolp &optional def-form) symbolp]] . [&or arg nil]))) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 (6755 . 6766) (6767 . 6772) (6773 . 6784) . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 (6856 . 6863) (6864 . 6873) (6874 . 6882) . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916) (name &or "nil" edebug-spec-p "t" "0" (&rest edebug-spec)) edebug-match-specs)
  edebug-match-specs((((([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or (symbolp &optional def-form) symbolp]] . [&or arg nil]))) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 (6755 . 6766) (6767 . 6772) (6773 . 6784) . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 (6856 . 6863) (6864 . 6873) (6874 . 6882) . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916) (:name edebug-spec name &or "nil" edebug-spec-p "t" "0" (&rest edebug-spec)) edebug-match-specs)
  edebug-match-specs((((([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or (symbolp &optional def-form) symbolp]] . [&or arg nil]))) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 (6755 . 6766) (6767 . 6772) (6773 . 6784) . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 (6856 . 6863) (6864 . 6873) (6874 . 6882) . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916) ("def-edebug-spec" :name edebug-spec name &or "nil" edebug-spec-p "t" "0" (&rest edebug-spec)) edebug-match-specs)
  edebug-match-sublist((((([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or (symbolp &optional def-form) symbolp]] . [&or arg nil]))) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 (6755 . 6766) (6767 . 6772) (6773 . 6784) . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 (6856 . 6863) (6864 . 6873) (6874 . 6882) . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916) ("def-edebug-spec" :name edebug-spec name &or "nil" edebug-spec-p "t" "0" (&rest edebug-spec)))
  edebug-match-list((((def-edebug-spec cl-lambda-list (([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" ... &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or ... symbolp]] . [&or arg nil])))) (6563 (6564 . 6579) (6580 . 6594) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 ... ... ... . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 ... ... ... . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916)) ("def-edebug-spec" :name edebug-spec name &or "nil" edebug-spec-p "t" "0" (&rest edebug-spec)))
  edebug-match-one-spec((((def-edebug-spec cl-lambda-list (([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" ... &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or ... symbolp]] . [&or arg nil])))) (6563 (6564 . 6579) (6580 . 6594) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 ... ... ... . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 ... ... ... . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916)) ("def-edebug-spec" :name edebug-spec name &or "nil" edebug-spec-p "t" "0" (&rest edebug-spec)))
  edebug-match-specs((((def-edebug-spec cl-lambda-list (([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" ... &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or ... symbolp]] . [&or arg nil])))) (6563 (6564 . 6579) (6580 . 6594) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 ... ... ... . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 ... ... ... . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916)) (("def-edebug-spec" :name edebug-spec name &or "nil" edebug-spec-p "t" "0" (&rest edebug-spec))) edebug-match-specs)
  edebug-match((((def-edebug-spec cl-lambda-list (([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" ... &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or ... symbolp]] . [&or arg nil])))) (6563 (6564 . 6579) (6580 . 6594) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 ... ... ... . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 ... ... ... . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916)) (("def-edebug-spec" :name edebug-spec name &or "nil" edebug-spec-p "t" "0" (&rest edebug-spec))))
  edebug-make-form-wrapper((((def-edebug-spec cl-lambda-list (([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" ... &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or ... symbolp]] . [&or arg nil])))) (6563 (6564 . 6579) (6580 . 6594) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 ... ... ... . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 ... ... ... . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916)) 6563 6915 (("def-edebug-spec" :name edebug-spec name &or "nil" edebug-spec-p "t" "0" (&rest edebug-spec))))
  edebug-read-and-maybe-wrap-form1()
  edebug-read-and-maybe-wrap-form()
  edebug-read-top-level-form()
  edebug-eval-defun((4))
  apply(edebug-eval-defun (4))
  eval-defun((4))
  funcall-interactively(eval-defun (4))
  call-interactively(eval-defun nil nil)
  command-execute(eval-defun)



In GNU Emacs 27.0.91 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.13)
 of 2020-04-20
Repository revision: a1040861f118881004f59866111f64cd0ae03b7a
Repository branch: emacs-27
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux rodete

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --enable-checking=all --enable-gtk-deprecation-warnings
 --enable-gcc-warnings=warn-only --enable-check-lisp-object-type
 --with-mailutils --without-pop 'CFLAGS=-O0 -g3' LDFLAGS=-g3'

Configured features:
XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY
LIBSELINUX GNUTLS FREETYPE HARFBUZZ XFT ZLIB TOOLKIT_SCROLL_BARS GTK3
X11 XDBE XIM MODULES THREADS PDUMPER GMP

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec epa epg epg-config gnus-util
rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils phst skeleton
derived edmacro kmacro pcase ffap thingatpt url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map url-vars mailcap subr-x rx gnutls puny seq
byte-opt gv bytecomp byte-compile cconv dbus xml cl-loaddefs cl-lib
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 63376 5964)
 (symbols 48 8446 1)
 (strings 32 22409 1771)
 (string-bytes 1 712188)
 (vectors 16 12506)
 (vector-slots 8 174130 4962)
 (floats 8 25 34)
 (intervals 56 201 0)
 (buffers 1000 12))

-- 
Google Germany GmbH
Erika-Mann-Straße 33
80636 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

If you received this communication by mistake, please don’t forward it to
anyone else (it may contain confidential or privileged information), please
erase all copies of it, including all attachments, and please let the sender
know it went to the wrong person.  Thanks.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#40766: 27.0.91; Cannot edebug cl-lambda-list edebug spec
       [not found] ` <mailman.944.1587560406.3066.bug-gnu-emacs@gnu.org>
@ 2020-04-23  6:41   ` Alan Mackenzie
  2020-04-23 19:23     ` Alan Mackenzie
  2020-04-24 16:01     ` Alan Mackenzie
  0 siblings, 2 replies; 5+ messages in thread
From: Alan Mackenzie @ 2020-04-23  6:41 UTC (permalink / raw)
  To: Philipp Stephani; +Cc: acm, 40766

Hello, Philipp.

In article <mailman.944.1587560406.3066.bug-gnu-emacs@gnu.org> you wrote:

> emacs -Q
> M-x find-library RET cl-macs RET
> Navigate to the form `(def-edebug-spec cl-lambda-list ...)'
> Hit C-u C-M-x to edebug it.

> This results in an error with backtrace:

Yes, I get this too.  The debug-spec definition looks like this:

    (def-edebug-spec cl-lambda-list
      (([&rest cl-lambda-arg]
        [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]]
        [&optional ["&rest" cl-lambda-arg]]
        [&optional ["&key" [cl-&key-arg &rest cl-&key-arg]
                    &optional "&allow-other-keys"]]
        [&optional ["&aux" &rest
                    &or (symbolp &optional def-form) symbolp]]
        . [&or arg nil])))

After playing around with it for a few hours, it is clear that the
bug is triggered by a combination of (i) the dot on the last line; and
(ii) the presence of at least one [&optional ...] before it, at the same
level of nesting.  Possibly the nesting of [ ... ] structures might have
something to do with it.

The debug-spec which we are attempting to use to parse the above is that
of deb-edebug-spec itself.  Let's call this "spec 2".

There is a dynamically bound variable edebug-dotted-spec which gets bound
to t when the parser encounters a "dotted spec" in spec 2.  The criterion
for making this binding is that the current fragment of spec 2,
presumably the last cdr in a list is a non-nil atom.  A vector is also an
atom, and it might be that there is confusion about this in edebug.el.
I'm still working on it.

Just one other comment.  Doing C-u C-M-x on an edebug-spec doesn't seem
to lead to any entry into edebug, even when this bug doesn't trigger.

Thanks for an interesting bug!

> Debugger entered--Lisp error: (invalid-read-syntax "Expected one of" "nil" edebug-spec-p "t" "0" (&rest edebug-spec))
>   signal(invalid-read-syntax ("Expected one of" "nil" edebug-spec-p "t" "0" (&rest edebug-spec)))
>   edebug-syntax-error("Expected one of" "nil" edebug-spec-p "t" "0" (&rest edebug-spec))
>   apply(edebug-syntax-error ("Expected one of" "nil" edebug-spec-p "t" "0" (&rest edebug-spec)))
>   edebug-no-match((((([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or (symbolp &optional def-form) symbolp]] . [&or arg nil]))) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 (6755 . 6766) (6767 . 6772) (6773 . 6784) . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 (6856 . 6863) (6864 . 6873) (6874 . 6882) . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916) "Expected one of" "nil" edebug-spec-p "t" "0" (&rest edebug-spec))
>   apply(edebug-no-match (((([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or (symbolp &optional def-form) symbolp]] . [&or arg nil]))) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 (6755 . 6766) (6767 . 6772) (6773 . 6784) . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 (6856 . 6863) (6864 . 6873) (6874 . 6882) . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916) "Expected one of" ("nil" edebug-spec-p "t" "0" (&rest edebug-spec)))
>   edebug-match-&or((((([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or (symbolp &optional def-form) symbolp]] . [&or arg nil]))) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 (6755 . 6766) (6767 . 6772) (6773 . 6784) . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 (6856 . 6863) (6864 . 6873) (6874 . 6882) . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916) ("nil" edebug-spec-p "t" "0" (&rest edebug-spec)))
>   edebug-match-specs((((([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or (symbolp &optional def-form) symbolp]] . [&or arg nil]))) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 (6755 . 6766) (6767 . 6772) (6773 . 6784) . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 (6856 . 6863) (6864 . 6873) (6874 . 6882) . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916) (&or "nil" edebug-spec-p "t" "0" (&rest edebug-spec)) edebug-match-specs)
>   edebug-match-specs((((([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or (symbolp &optional def-form) symbolp]] . [&or arg nil]))) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 (6755 . 6766) (6767 . 6772) (6773 . 6784) . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 (6856 . 6863) (6864 . 6873) (6874 . 6882) . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916) (name &or "nil" edebug-spec-p "t" "0" (&rest edebug-spec)) edebug-match-specs)
>   edebug-match-specs((((([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or (symbolp &optional def-form) symbolp]] . [&or arg nil]))) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 (6755 . 6766) (6767 . 6772) (6773 . 6784) . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 (6856 . 6863) (6864 . 6873) (6874 . 6882) . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916) (:name edebug-spec name &or "nil" edebug-spec-p "t" "0" (&rest edebug-spec)) edebug-match-specs)
>   edebug-match-specs((((([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or (symbolp &optional def-form) symbolp]] . [&or arg nil]))) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 (6755 . 6766) (6767 . 6772) (6773 . 6784) . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 (6856 . 6863) (6864 . 6873) (6874 . 6882) . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916) ("def-edebug-spec" :name edebug-spec name &or "nil" edebug-spec-p "t" "0" (&rest edebug-spec)) edebug-match-specs)
>   edebug-match-sublist((((([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or (symbolp &optional def-form) symbolp]] . [&or arg nil]))) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 (6755 . 6766) (6767 . 6772) (6773 . 6784) . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 (6856 . 6863) (6864 . 6873) (6874 . 6882) . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916) ("def-edebug-spec" :name edebug-spec name &or "nil" edebug-spec-p "t" "0" (&rest edebug-spec)))
>   edebug-match-list((((def-edebug-spec cl-lambda-list (([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" ... &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or ... symbolp]] . [&or arg nil])))) (6563 (6564 . 6579) (6580 . 6594) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 ... ... ... . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 ... ... ... . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916)) ("def-edebug-spec" :name edebug-spec name &or "nil" edebug-spec-p "t" "0" (&rest edebug-spec)))
>   edebug-match-one-spec((((def-edebug-spec cl-lambda-list (([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" ... &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or ... symbolp]] . [&or arg nil])))) (6563 (6564 . 6579) (6580 . 6594) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 ... ... ... . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 ... ... ... . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916)) ("def-edebug-spec" :name edebug-spec name &or "nil" edebug-spec-p "t" "0" (&rest edebug-spec)))
>   edebug-match-specs((((def-edebug-spec cl-lambda-list (([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" ... &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or ... symbolp]] . [&or arg nil])))) (6563 (6564 . 6579) (6580 . 6594) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 ... ... ... . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 ... ... ... . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916)) (("def-edebug-spec" :name edebug-spec name &or "nil" edebug-spec-p "t" "0" (&rest edebug-spec))) edebug-match-specs)
>   edebug-match((((def-edebug-spec cl-lambda-list (([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" ... &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or ... symbolp]] . [&or arg nil])))) (6563 (6564 . 6579) (6580 . 6594) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 ... ... ... . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 ... ... ... . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916)) (("def-edebug-spec" :name edebug-spec name &or "nil" edebug-spec-p "t" "0" (&rest edebug-spec))))
>   edebug-make-form-wrapper((((def-edebug-spec cl-lambda-list (([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" ... &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or ... symbolp]] . [&or arg nil])))) (6563 (6564 . 6579) (6580 . 6594) (6597 (6598 (6599 (6600 . 6605) (6606 . 6619) . 6620) (6625 (6626 . 6635) (6636 (6637 . 6648) (6649 . 6665) (6666 . 6671) (6672 . 6688) . 6689) . 6690) (6695 (6696 . 6705) (6706 (6707 . 6714) (6715 . 6728) . 6729) . 6730) (6735 (6736 . 6745) (6746 (6747 . 6753) (6754 ... ... ... . 6785) (6788 . 6797) (6798 . 6817) . 6818) . 6819) (6824 (6825 . 6834) (6835 (6836 . 6842) (6843 . 6848) (6851 . 6854) (6855 ... ... ... . 6883) (6884 . 6891) . 6892) . 6893) (6899 (6901 . 6904) (6905 . 6908) (6909 . 6912) . 6913) . 6914) . 6915) . 6916)) 6563 6915 (("def-edebug-spec" :name edebug-spec name &or "nil" edebug-spec-p "t" "0" (&rest edebug-spec))))
>   edebug-read-and-maybe-wrap-form1()
>   edebug-read-and-maybe-wrap-form()
>   edebug-read-top-level-form()
>   edebug-eval-defun((4))
>   apply(edebug-eval-defun (4))
>   eval-defun((4))
>   funcall-interactively(eval-defun (4))
>   call-interactively(eval-defun nil nil)
>   command-execute(eval-defun)



> In GNU Emacs 27.0.91 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.13)
>  of 2020-04-20
> Repository revision: a1040861f118881004f59866111f64cd0ae03b7a
> Repository branch: emacs-27
> Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
> System Description: Debian GNU/Linux rodete

[ .... ]

> -- 
> Google Germany GmbH
> Erika-Mann-Straße 33
> 80636 München

-- 
Alan Mackenzie (Nuremberg, Germany).






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#40766: 27.0.91; Cannot edebug cl-lambda-list edebug spec
  2020-04-23  6:41   ` Alan Mackenzie
@ 2020-04-23 19:23     ` Alan Mackenzie
  2020-04-24 16:01     ` Alan Mackenzie
  1 sibling, 0 replies; 5+ messages in thread
From: Alan Mackenzie @ 2020-04-23 19:23 UTC (permalink / raw)
  To: Philipp Stephani; +Cc: 40766

Hello again, Philipp.

On Thu, Apr 23, 2020 at 06:41:28 -0000, Alan Mackenzie wrote:
> In article <mailman.944.1587560406.3066.bug-gnu-emacs@gnu.org> you wrote:

> > emacs -Q
> > M-x find-library RET cl-macs RET
> > Navigate to the form `(def-edebug-spec cl-lambda-list ...)'
> > Hit C-u C-M-x to edebug it.

> > This results in an error with backtrace:

Yes.  There is a bug in the edebug specs for edebug-spec-list and
edebug-spec.  (Sorry about this sounding confusing.  Believe me, it's
nothing compared with the head banging involved in keeping various
levels of the debug specs mentally separate.  ;-)  These two specs are
the main components of the debug spec for def-edebug-spec.  (It's
probably still confusing at this stage.)  These two things look like
this:

    (def-edebug-spec edebug-spec-list
      ;; A list must have something in it, or it is nil, a symbolp
      ((edebug-spec . [&or nil edebug-spec])))

    (def-edebug-spec edebug-spec
      (&or
    ; edebug-spec-list   <==============================================
       (vector &rest edebug-spec)           ; matches a vector
       ("vector" &rest edebug-spec)         ; matches a vector spec
       ("quote" symbolp)
       edebug-spec-list ;; <============================================
       stringp
       [edebug-lambda-list-keywordp &rest edebug-spec]
       [keywordp gate edebug-spec]
       edebug-spec-p  ;; Including all the special ones e.g. form.
       symbolp;; a predicate
       ))

The target spec, let's continue calling it spec 2, reduced to it's
minimum required to trigger the bug, looks like:

    (def-edebug-spec acm-lambda-list
      (([&rest cl-lambda-arg]
        ["&optional" cl-&optional-arg &rest cl-&optional-arg]
        . [&or arg nil])))

.  The essential attributes are it has enclosing parens (at least)
containing two vectors followed by a dot followed by a third vector.

When spec 2 gets parsed by edebug-spec (see above), it eventually
reaches a dotted list containing the three vectors.  It parses this with
edebug-spec-list containing the first two vectors.  But BECAUSE
edebug-spec-list IS MISPLACED INSIDE edebug-spec (see the two arrowed
lines), the second vector triggers recognition by (vector ....) rather
than by edebug-spec-list.  This "dedottifies" the dotted list in spec 2,
so that when the dot in spec 2 is reached, edebug-spec-list doesn't know
how to handle it.  For some reason, the backtracking doesn't backtrack
here.

The solution to the problem is to move the edebug-spec-list from after
the (vector ...) and ("quote" ....) entries to before them, as indicated
above.  This causes the second vector to get handled as the first
element of the cdr of the list it's contained within.


> Yes, I get this too.  The debug-spec definition looks like this:

>     (def-edebug-spec cl-lambda-list
>       (([&rest cl-lambda-arg]
>         [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]]
>         [&optional ["&rest" cl-lambda-arg]]
>         [&optional ["&key" [cl-&key-arg &rest cl-&key-arg]
>                     &optional "&allow-other-keys"]]
>         [&optional ["&aux" &rest
>                     &or (symbolp &optional def-form) symbolp]]
>         . [&or arg nil])))

> After playing around with it for a few hours, it is clear that the
> bug is triggered by a combination of (i) the dot on the last line; and
> (ii) the presence of at least one [&optional ...] before it, at the same
> level of nesting.  Possibly the nesting of [ ... ] structures might have
> something to do with it.

So, I propose installing the following patch to fix the bug:


diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index bb7817f242..7995a9e5a2 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -2115,10 +2115,10 @@ edebug-spec-list
 
 (def-edebug-spec edebug-spec
   (&or
+   edebug-spec-list
    (vector &rest edebug-spec)		; matches a vector
    ("vector" &rest edebug-spec)		; matches a vector spec
    ("quote" symbolp)
-   edebug-spec-list
    stringp
    [edebug-lambda-list-keywordp &rest edebug-spec]
    [keywordp gate edebug-spec]


> > -- 
> > Google Germany GmbH
> > Erika-Mann-Straße 33
> > 80636 München

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#40766: 27.0.91; Cannot edebug cl-lambda-list edebug spec
  2020-04-23  6:41   ` Alan Mackenzie
  2020-04-23 19:23     ` Alan Mackenzie
@ 2020-04-24 16:01     ` Alan Mackenzie
  2020-04-24 16:14       ` Philipp Stephani
  1 sibling, 1 reply; 5+ messages in thread
From: Alan Mackenzie @ 2020-04-24 16:01 UTC (permalink / raw)
  To: Philipp Stephani, 40766-done

Hello, Philipp.

On Thu, Apr 23, 2020 at 06:41:28 -0000, Alan Mackenzie wrote:

> In article <mailman.944.1587560406.3066.bug-gnu-emacs@gnu.org> you wrote:

> > emacs -Q
> > M-x find-library RET cl-macs RET
> > Navigate to the form `(def-edebug-spec cl-lambda-list ...)'
> > Hit C-u C-M-x to edebug it.

> > This results in an error with backtrace:

The bug has been fixed in the Emacs master branch.

> > -- 
> > Google Germany GmbH
> > Erika-Mann-Straße 33
> > 80636 München

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#40766: 27.0.91; Cannot edebug cl-lambda-list edebug spec
  2020-04-24 16:01     ` Alan Mackenzie
@ 2020-04-24 16:14       ` Philipp Stephani
  0 siblings, 0 replies; 5+ messages in thread
From: Philipp Stephani @ 2020-04-24 16:14 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: 40766-done

Am Fr., 24. Apr. 2020 um 18:01 Uhr schrieb Alan Mackenzie <acm@muc.de>:
>
> Hello, Philipp.
>
> On Thu, Apr 23, 2020 at 06:41:28 -0000, Alan Mackenzie wrote:
>
> > In article <mailman.944.1587560406.3066.bug-gnu-emacs@gnu.org> you wrote:
>
> > > emacs -Q
> > > M-x find-library RET cl-macs RET
> > > Navigate to the form `(def-edebug-spec cl-lambda-list ...)'
> > > Hit C-u C-M-x to edebug it.
>
> > > This results in an error with backtrace:
>
> The bug has been fixed in the Emacs master branch.

Thanks a lot for tracking this down and fixing it so quickly!





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-24 16:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-22 12:58 bug#40766: 27.0.91; Cannot edebug cl-lambda-list edebug spec Philipp Stephani
     [not found] ` <mailman.944.1587560406.3066.bug-gnu-emacs@gnu.org>
2020-04-23  6:41   ` Alan Mackenzie
2020-04-23 19:23     ` Alan Mackenzie
2020-04-24 16:01     ` Alan Mackenzie
2020-04-24 16:14       ` Philipp Stephani

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).