From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Madhu Newsgroups: gmane.emacs.devel Subject: obscure compilation error with cl-defstruct &aux boa constructor Date: Sat, 16 Apr 2022 22:16:18 +0530 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11619"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Cancel-Lock: sha1:FCUur4/pqtQvy6Anf8L922y7QqE= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 16 18:47:10 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nflZl-0002si-Ol for ged-emacs-devel@m.gmane-mx.org; Sat, 16 Apr 2022 18:47:09 +0200 Original-Received: from localhost ([::1]:53660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nflZk-0004OA-FW for ged-emacs-devel@m.gmane-mx.org; Sat, 16 Apr 2022 12:47:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nflYw-0003Zd-QY for emacs-devel@gnu.org; Sat, 16 Apr 2022 12:46:18 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:41610) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nflYv-00064p-8D for emacs-devel@gnu.org; Sat, 16 Apr 2022 12:46:18 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1nflYr-0001ol-T3 for emacs-devel@gnu.org; Sat, 16 Apr 2022 18:46:13 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:288485 Archived-At: This is a self-inflicted injury,, but nevertheless here goes: lisp/emacs-lisp/lisp-mode.el has a struct #+begin_src emacs lisp (cl-defstruct (lisp-indent-state (:constructor nil) (:constructor lisp-indent-initial-state (&aux (ppss (lisp-ppss)) (ppss-point (point)) (stack (make-list (1+ (car ppss)) nil))))) stack ;; Cached indentation, per depth. ppss ppss-point) #+end_src I had a local patch (suggested by Noam Postavsky) which retained the old open-paren-in-column-0-is-defun-start behaviour with an overriding advice on lisp-ppss. This patch modified the args to the lisp-indent-initial-state constructor to look like this: #+begin_src emacs_lisp (&optional (ppss (lisp-ppss)) &aux (ppss-point (point)) (stack (make-list (1+ (car ppss)) nil))))) #+end_src Recently this leads to an obscure compilation/bootstrap error. #+begin_example Loading textmodes/paragraphs... Loading progmodes/prog-mode... Loading /dev/shm/emacs/lisp/emacs-lisp/lisp-mode.el (source)... Eager macro-expansion failure: (void-variable emacs-lisp-mode-syntax-table) Eager macro-expansion failure: (void-variable emacs-lisp-mode-syntax-table) Error: void-variable (emacs-lisp-mode-syntax-table) mapbacktrace(#[1028 "!!!!B5@!A5!!!" [princ " " prin1 "(" " (" " " ")\n"] 7 "\n\n(fn EVALD FUNC ARGS FLAGS)"]) debug-early-backtrace() debug-early(error (void-variable emacs-lisp-mode-syntax-table)) byte-code(!##" [emacs-lisp-mode-syntax-table make-syntax-table modify-syntax-entry 8216 "(’ " 8217 ")‘ "] 5) (defvar help-mode-syntax-table (byte-code !##" [emacs-lisp-mode-syntax-table make-syntax-table modify-syntax-entry 8216 "(’ " 8217 ")‘ "] 5) ("/dev/shm/emacs/lisp/help-mode.elc" . 4653)) require(help-mode) byte-code("#!E\"" [set-advertised-calling-convention cl-prettyexpand (form) "27.1" require help-mode add-to-list describe-symbol-backends nil cl-find-class #[771 "!" [cl-describe-type] 5 "\n\n(fn S B F)"]] 5) cl-subseq((&cl-defs (nil (cl-tag-slot) (stack) (ppss) (ppss-point)) &optional (ppss (lisp-ppss)) &aux (ppss-point (point)) (stack (make-list (1+ (car ppss)) nil))) 0 4) cl--make-usage-args((&cl-defs (nil (cl-tag-slot) (stack) (ppss) (ppss-point)) &optional (ppss (lisp-ppss)) &aux (ppss-point (point)) (stack (make-list (1+ (car ppss)) nil)))) cl--transform-lambda(((&cl-defs (nil (cl-tag-slot) (stack) (ppss) (ppss-point)) &optional (ppss (lisp-ppss)) &aux (ppss-point (point)) (stack (make-list (1+ (car ppss)) nil))) "Constructor for objects of type `lisp-indent-state'." (declare (side-effect-free t)) (record 'lisp-indent-state stack ppss ppss-point)) lisp-indent-initial-state) #[642 "B\"BB" [defun cl--transform-lambda] 8 ("/dev/shm/emacs/lisp/emacs-lisp/cl-macs.elc" . 6880)](lisp-indent-initial-state (&cl-defs (nil (cl-tag-slot) (stack) (ppss) (ppss-point)) &optional (ppss (lisp-ppss)) &aux (ppss-point (point)) (stack (make-list (1+ (car ppss)) nil))) "Constructor for objects of type `lisp-indent-state'." (declare (side-effect-free t)) (record 'lisp-indent-state stack ppss ppss-point)) (cl-defun lisp-indent-initial-state (&cl-defs (nil (cl-tag-slot) (stack) (ppss) (ppss-point)) &optional (ppss (lisp-ppss)) &aux (ppss-point (point)) (stack (make-list (1+ (car ppss)) nil))) "Constructor for objects of type `lisp-indent-state'." (declare (side-effect-free t)) (record 'lisp-indent-state stack ppss ppss-point)) eval-buffer(# nil "/dev/shm/emacs/lisp/emacs-lisp/lisp-mode.el" nil t) load-with-code-conversion("/dev/shm/emacs/lisp/emacs-lisp/lisp-mode.el" "/dev/shm/emacs/lisp/emacs-lisp/lisp-mode.el" nil nil) load("emacs-lisp/lisp-mode") load("loadup.el") Symbol’s value as variable is void: emacs-lisp-mode-syntax-table make[1]: *** [Makefile:927: bootstrap-emacs.pdmp] Error 255 make[1]: Leaving directory '/dev/shm/emacs/src' make: *** [Makefile:469: src] Error 2 #+end_example The error goes away if I remove the &aux (and thus make all the arguments optional) Might this be a bug from a recent change? (I've not looked at the changes yet, so this is a note to self)