From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.devel Subject: Re: Autoload is being read inside documentation Date: Tue, 14 Jun 2022 23:55:45 +0300 Message-ID: <8735g7rmlq.fsf@tcd.ie> References: <87r1445qc9.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6482"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Daniel Fleischer , emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jun 14 22:56:55 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 1o1Dao-0001HF-79 for ged-emacs-devel@m.gmane-mx.org; Tue, 14 Jun 2022 22:56:54 +0200 Original-Received: from localhost ([::1]:34684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1Dan-0007gD-1X for ged-emacs-devel@m.gmane-mx.org; Tue, 14 Jun 2022 16:56:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1DZt-0006ls-Dt for emacs-devel@gnu.org; Tue, 14 Jun 2022 16:55:57 -0400 Original-Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:36837) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1DZp-0005vc-TG for emacs-devel@gnu.org; Tue, 14 Jun 2022 16:55:57 -0400 Original-Received: by mail-wm1-x333.google.com with SMTP id i81-20020a1c3b54000000b0039c76434147so71289wma.1 for ; Tue, 14 Jun 2022 13:55:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=apFQh+7sExOROYi2dXHY44VTrbXwJgZ69A5yc4HgBl4=; b=ZiG+4c7xTNDoax70eNnM+zKLLRqCg0FPTsN65jT7P3Nu4+RJaMIEdGQnfyiRIc8tPS 6nE7hWa+TvMGG0vWvw51kyxW2mcRvhFKpM6KJR7keimE5Fekz2RuErH2Pb9RXfkeEXsW 1lqxi59txt9eM+4a25aOYG8dliF0fxnAT49vndMll9qsX28KWQE/KcZuNIqt6l3z7A15 ZS2VXzLNEkx/SRW0qm6pS+1jFiapjTZC1mcoo4FDsmB6KCSM+lVkWNwQkH2vBi5ETfNE QxVVbPjdJBR3oQOvh2eM6dojE/w1Gt3OYvlewZaOVVF1r9PFprIcrXmcqMKtlOjEn7qe 6VxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=apFQh+7sExOROYi2dXHY44VTrbXwJgZ69A5yc4HgBl4=; b=6OD7IFFRg5fynh+fJLHR/JFVbg8YMQ9eHJkFq2ayZXTox6v3QK5iBjXxAnVb9sar5m QjKOAGaQO3ocm3q1Jzy6l80Xlzng23OdDvvGBpvb7RAOkufccpiaf4SSx8/N3dl/JkCm osjkubaL7C46wS4vrsUOzuFdNfXecIFril666wYanwrTEKVuGFzNQNY9trKB5cuF6es/ VD76wVhcvS4voRH90zjF8CSSXgEuDsJVpL4qWmXY33YBzs1hFs9V8QdkBK6x8tgSRgF0 QoBnM8PxyiFNR+IBHHsEc/ALsHP3QeK0G3oPE5OBGMF+FvFnastDP8yaGVESOjYPm2H3 Ieuw== X-Gm-Message-State: AOAM532rHeCq2t1ZRt/OKEbMSilkLw5IWw+Pm87lgvhOzTgmj/IkR/q7 GGz9+h9MyIyj/AcF3RswnIcAlA== X-Google-Smtp-Source: ABdhPJwaN8VDXLHv5HVF+tjnyyVLJQSUmNZ6Eazh00l7+BhciDcBBculxMqO4hfwxSvojVET8MOtfQ== X-Received: by 2002:a05:600c:4f13:b0:39d:b6c5:ce4e with SMTP id l19-20020a05600c4f1300b0039db6c5ce4emr2022986wmq.34.1655240148627; Tue, 14 Jun 2022 13:55:48 -0700 (PDT) Original-Received: from localhost ([2a02:587:322b:6f5e:dc92:136a:a7c4:dc8c]) by smtp.gmail.com with ESMTPSA id d5-20020a5d5385000000b00213b93cff5fsm12776986wrv.98.2022.06.14.13.55.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jun 2022 13:55:47 -0700 (PDT) In-Reply-To: <87r1445qc9.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 04 Jun 2022 18:46:30 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=contovob@tcd.ie; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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:291187 Archived-At: --=-=-= Content-Type: text/plain Lars Ingebrigtsen [2022-06-04 18:46 +0200] wrote: > Daniel Fleischer writes: > >> Hi, I've noticed a possible bug where an ;;;###autoload directive is >> being read inside a documentation string of some `defvar` which didn't >> happen before. > > There shouldn't be any such doc string in the Emacs tree -- did you find > this problem with an external package? > > I've now made the scanner check whether it's inside a string (when > scanning outside of the Emacs build). Thanks, but git-bisect says this change had other fallout with package autoloads: e74652386d62a5a6142bf6332e0e4b4aa48c7088 is the first bad commit commit e74652386d62a5a6142bf6332e0e4b4aa48c7088 Author: Lars Ingebrigtsen Date: Sat Jun 4 18:41:10 2022 +0200 Make loaddefs-generate--parse-file more robust * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--parse-file): Ensure that we don't have an autoload cookie on the first column inside a string. Here's the recipe: $ cd "$(mktemp -d)" $ export HOME="$PWD" XDG_CONFIG_HOME="$PWD/.config" $ emacs -Q M-x package-install RET auctex RET C-x C-c $ emacs -Q -f toggle-debug-on-error -f package-initialize C-x C-f foo.tex RET Here's the backtrace: --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=backtrace.txt Content-Transfer-Encoding: quoted-printable Debugger entered--Lisp error: (void-function TeX-latex-mode) TeX-latex-mode() apply(TeX-latex-mode nil) latex-mode() tex--redirect-to-submode(#f(advice TeX-tex-mode :override #f(compiled-fun= ction () (interactive nil) #))) apply(tex--redirect-to-submode #f(advice TeX-tex-mode :override #f(compil= ed-function () (interactive nil) #)) nil) tex-mode() set-auto-mode-0(tex-mode nil) set-auto-mode--apply-alist((("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" nil epa-fi= le) ("\\.elc\\'" . elisp-byte-code-mode) ("\\.zst\\'" nil jka-compr) ("\\.d= z\\'" nil jka-compr) ("\\.xz\\'" nil jka-compr) ("\\.lzma\\'" nil jka-compr= ) ("\\.lz\\'" nil jka-compr) ("\\.g?z\\'" nil jka-compr) ("\\.bz2\\'" nil j= ka-compr) ("\\.Z\\'" nil jka-compr) ("\\.vr[hi]?\\'" . vera-mode) ("\\(?:\\= .\\(?:rbw?\\|ru\\|rake\\|thor\\|jbuilder\\|rabl\\|ge..." . ruby-mode) ("\\.= re?st\\'" . rst-mode) ("\\.py[iw]?\\'" . python-mode) ("\\.m\\'" . octave-m= aybe-mode) ("\\.less\\'" . less-css-mode) ("\\.scss\\'" . scss-mode) ("\\.a= wk\\'" . awk-mode) ("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\\)?\\)\\'" . pike-mo= de) ("\\.idl\\'" . idl-mode) ("\\.java\\'" . java-mode) ("\\.m\\'" . objc-m= ode) ("\\.ii\\'" . c++-mode) ("\\.i\\'" . c-mode) ("\\.lex\\'" . c-mode) ("= \\.y\\(acc\\)?\\'" . c-mode) ("\\.h\\'" . c-or-c++-mode) ("\\.c\\'" . c-mod= e) ("\\.\\(CC?\\|HH?\\)\\'" . c++-mode) ("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'"= . c++-mode) ("\\.\\(cc\\|hh\\)\\'" . c++-mode) ("\\.\\(bat\\|cmd\\)\\'" . = bat-mode) ("\\.[sx]?html?\\(\\.[a-zA-Z_]+\\)?\\'" . mhtml-mode) ("\\.svgz?\= \'" . image-mode) ("\\.svgz?\\'" . xml-mode) ("\\.x[bp]m\\'" . image-mode) = ("\\.x[bp]m\\'" . c-mode) ("\\.p[bpgn]m\\'" . image-mode) ("\\.tiff?\\'" . = image-mode) ("\\.gif\\'" . image-mode) ("\\.png\\'" . image-mode) ("\\.jpe?= g\\'" . image-mode) ("\\.webp\\'" . image-mode) ("\\.te?xt\\'" . text-mode)= ("\\.[tT]e[xX]\\'" . tex-mode) ("\\.ins\\'" . tex-mode) ("\\.ltx\\'" . lat= ex-mode) ("\\.dtx\\'" . doctex-mode) ("\\.org\\'" . org-mode) ("\\.dir-loca= ls\\(?:-2\\)?\\.el\\'" . lisp-data-mode) ...) nil nil) set-auto-mode() normal-mode(t) after-find-file(t t) find-file-noselect-1(# "~/foo.tex" nil nil "~/foo.tex" ni= l) find-file-noselect("~/foo.tex" nil nil t) find-file("~/foo.tex" t) funcall-interactively(find-file "~/foo.tex" t) call-interactively(find-file nil nil) command-execute(find-file) --=-=-= Content-Type: text/plain It looks like a subset of AUCTeX's autoloads are no longer included in auctex-autoloads.el: --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=auctex-autoloads.diff diff --show-c-function -u /tmp/auctex-autoloads-good.el /tmp/auctex-autoloads-bad.el --- /tmp/auctex-autoloads-good.el 2022-06-14 23:42:15.827566892 +0300 +++ /tmp/auctex-autoloads-bad.el 2022-06-14 23:26:45.625237807 +0300 @@ -9,15 +9,6 @@ ;;; Generated autoloads from bib-cite.el -(autoload 'bib-cite-minor-mode "bib-cite" "\ -Toggle bib-cite mode. -When bib-cite mode is enabled, citations, labels and refs are highlighted -when the mouse is over them. Clicking on these highlights with [mouse-2] -runs `bib-find', and [mouse-3] runs `bib-display'. - -(fn ARG)" t nil) -(autoload 'turn-on-bib-cite "bib-cite" "\ -Unconditionally turn on Bib Cite mode." nil nil) (register-definition-prefixes "bib-cite" '("LaTeX-" "bib-" "create-alist-from-list" "member-cis" "psg-" "search-directory-tree")) @@ -76,26 +67,6 @@ (autoload 'BibTeX-auto-store "latex" "\ This function should be called from `bibtex-mode-hook'. It will setup BibTeX to store keys in an auto file." nil nil) -(add-to-list 'auto-mode-alist '("\\.drv\\'" . latex-mode) t) -(add-to-list 'auto-mode-alist '("\\.hva\\'" . latex-mode)) -(autoload 'TeX-latex-mode "latex" "\ -Major mode in AUCTeX for editing LaTeX files. -See info under AUCTeX for full documentation. - -Special commands: -\\{LaTeX-mode-map} - -Entering LaTeX mode calls the value of `text-mode-hook', -then the value of `TeX-mode-hook', and then the value -of `LaTeX-mode-hook'." t nil) -(add-to-list 'auto-mode-alist '("\\.dtx\\'" . doctex-mode)) -(autoload 'docTeX-mode "latex" "\ -Major mode in AUCTeX for editing .dtx files derived from `LaTeX-mode'. -Runs `LaTeX-mode', sets a few variables and -runs the hooks in `docTeX-mode-hook'. - -(fn)" t nil) -(defalias 'TeX-doctex-mode #'docTeX-mode) (register-definition-prefixes "latex" '("Bib" "LaTeX-" "TeX-" "docTeX-" "latex-math-mode")) @@ -212,10 +183,6 @@ ;;; Generated autoloads from tex-bar.el -(autoload 'TeX-install-toolbar "tex-bar" "\ -Install toolbar buttons for TeX mode." t nil) -(autoload 'LaTeX-install-toolbar "tex-bar" "\ -Install toolbar buttons for LaTeX mode." t nil) (register-definition-prefixes "tex-bar" '("TeX-bar-")) Diff finished. Tue Jun 14 23:42:35 2022 --=-=-= Content-Type: text/plain -- Basil In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu) of 2022-06-14 built on tia Repository revision: e74652386d62a5a6142bf6332e0e4b4aa48c7088 Repository branch: HEAD System Description: Debian GNU/Linux bookworm/sid Configured using: 'configure --prefix=/home/blc/.local --with-x-toolkit=no --without-x' Configured features: ACL DBUS GMP GNUTLS GPM JSON LCMS2 LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER SECCOMP SOUND SQLITE3 THREADS XIM ZLIB Important settings: value of $LANG: en_IE.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Debugger Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t buffer-read-only: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message yank-media rmc puny dired dnd dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util 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 help-fns radix-tree cl-print debug backtrace help-mode find-func tex-mode compile text-property-search shell pcomplete comint ansi-color ring latexenc finder-inf info tool-bar auctex-autoloads tex-site package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars seq cl-loaddefs cl-lib cus-start cus-load term/xterm xterm gv subr-x byte-opt bytecomp byte-compile cconv regexp-opt iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice simple cl-generic indonesian philippine 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 emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 109799 6599) (symbols 48 10658 0) (strings 32 35218 2075) (string-bytes 1 1023582) (vectors 16 16588) (vector-slots 8 191428 5927) (floats 8 41 32) (intervals 56 675 0) (buffers 992 12)) --=-=-=--