unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Autoload is being read inside documentation
@ 2022-06-04 15:55 Daniel Fleischer
  2022-06-04 16:46 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Fleischer @ 2022-06-04 15:55 UTC (permalink / raw)
  To: emacs-devel


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.

I'm on master 0a5477b448e.

Thanks,

-- 

Daniel Fleischer




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

* Re: Autoload is being read inside documentation
  2022-06-04 15:55 Autoload is being read inside documentation Daniel Fleischer
@ 2022-06-04 16:46 ` Lars Ingebrigtsen
  2022-06-04 16:52   ` Daniel Fleischer
  2022-06-14 20:55   ` Basil L. Contovounesios
  0 siblings, 2 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-04 16:46 UTC (permalink / raw)
  To: Daniel Fleischer; +Cc: emacs-devel

Daniel Fleischer <danflscr@gmail.com> 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).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



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

* Re: Autoload is being read inside documentation
  2022-06-04 16:46 ` Lars Ingebrigtsen
@ 2022-06-04 16:52   ` Daniel Fleischer
  2022-06-14 20:55   ` Basil L. Contovounesios
  1 sibling, 0 replies; 6+ messages in thread
From: Daniel Fleischer @ 2022-06-04 16:52 UTC (permalink / raw)
  To: emacs-devel

Lars Ingebrigtsen [2022-06-04 Sat 18:46] wrote:

> There shouldn't be any such doc string in the Emacs tree -- did you find
> this problem with an external package?

Yes, an external package, see
https://github.com/cpitclaudel/biblio.el/blob/master/biblio-core.el#L833-L834.

> I've now made the scanner check whether it's inside a string (when
> scanning outside of the Emacs build).

Thanks!

-- 

Daniel Fleischer




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

* Re: Autoload is being read inside documentation
  2022-06-04 16:46 ` Lars Ingebrigtsen
  2022-06-04 16:52   ` Daniel Fleischer
@ 2022-06-14 20:55   ` Basil L. Contovounesios
  2022-06-15 12:05     ` Lars Ingebrigtsen
  1 sibling, 1 reply; 6+ messages in thread
From: Basil L. Contovounesios @ 2022-06-14 20:55 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Daniel Fleischer, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1234 bytes --]

Lars Ingebrigtsen [2022-06-04 18:46 +0200] wrote:

> Daniel Fleischer <danflscr@gmail.com> 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 <larsi@gnus.org>
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:


[-- Attachment #2: backtrace.txt --]
[-- Type: text/plain, Size: 2423 bytes --]

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-function () (interactive nil) #<bytecode 0x17c9c237b2ee7511>)))
  apply(tex--redirect-to-submode #f(advice TeX-tex-mode :override #f(compiled-function () (interactive nil) #<bytecode 0x17c9c237b2ee7511>)) nil)
  tex-mode()
  set-auto-mode-0(tex-mode nil)
  set-auto-mode--apply-alist((("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" nil epa-file) ("\\.elc\\'" . elisp-byte-code-mode) ("\\.zst\\'" nil jka-compr) ("\\.dz\\'" nil jka-compr) ("\\.xz\\'" nil jka-compr) ("\\.lzma\\'" nil jka-compr) ("\\.lz\\'" nil jka-compr) ("\\.g?z\\'" nil jka-compr) ("\\.bz2\\'" nil jka-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-maybe-mode) ("\\.less\\'" . less-css-mode) ("\\.scss\\'" . scss-mode) ("\\.awk\\'" . awk-mode) ("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\\)?\\)\\'" . pike-mode) ("\\.idl\\'" . idl-mode) ("\\.java\\'" . java-mode) ("\\.m\\'" . objc-mode) ("\\.ii\\'" . c++-mode) ("\\.i\\'" . c-mode) ("\\.lex\\'" . c-mode) ("\\.y\\(acc\\)?\\'" . c-mode) ("\\.h\\'" . c-or-c++-mode) ("\\.c\\'" . c-mode) ("\\.\\(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\\'" . latex-mode) ("\\.dtx\\'" . doctex-mode) ("\\.org\\'" . org-mode) ("\\.dir-locals\\(?:-2\\)?\\.el\\'" . lisp-data-mode) ...) nil nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(t t)
  find-file-noselect-1(#<buffer foo.tex> "~/foo.tex" nil nil "~/foo.tex" nil)
  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)

[-- Attachment #3: Type: text/plain, Size: 94 bytes --]


It looks like a subset of AUCTeX's autoloads are no longer included in
auctex-autoloads.el:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: auctex-autoloads.diff --]
[-- Type: text/x-diff, Size: 2196 bytes --]

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 @@
 \f
 ;;; 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"))
 
 \f
@@ -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"))
 
 \f
@@ -212,10 +183,6 @@
 \f
 ;;; 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-"))
 
 \f

Diff finished.  Tue Jun 14 23:42:35 2022

[-- Attachment #5: Type: text/plain, Size: 3069 bytes --]


-- 
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))

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

* Re: Autoload is being read inside documentation
  2022-06-14 20:55   ` Basil L. Contovounesios
@ 2022-06-15 12:05     ` Lars Ingebrigtsen
  2022-06-15 18:37       ` Basil L. Contovounesios
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-15 12:05 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: Daniel Fleischer, emacs-devel

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

> Thanks, but git-bisect says this change had other fallout with package
> autoloads:

I think this should be fixed on the trunk now.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



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

* Re: Autoload is being read inside documentation
  2022-06-15 12:05     ` Lars Ingebrigtsen
@ 2022-06-15 18:37       ` Basil L. Contovounesios
  0 siblings, 0 replies; 6+ messages in thread
From: Basil L. Contovounesios @ 2022-06-15 18:37 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Daniel Fleischer, emacs-devel

Lars Ingebrigtsen [2022-06-15 14:05 +0200] wrote:

> "Basil L. Contovounesios" <contovob@tcd.ie> writes:
>
>> Thanks, but git-bisect says this change had other fallout with package
>> autoloads:
>
> I think this should be fixed on the trunk now.

Can confirm, thanks,

-- 
Basil



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

end of thread, other threads:[~2022-06-15 18:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-04 15:55 Autoload is being read inside documentation Daniel Fleischer
2022-06-04 16:46 ` Lars Ingebrigtsen
2022-06-04 16:52   ` Daniel Fleischer
2022-06-14 20:55   ` Basil L. Contovounesios
2022-06-15 12:05     ` Lars Ingebrigtsen
2022-06-15 18:37       ` Basil L. Contovounesios

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).