GNU bug report logs -
#24542
25.1.50; The symbol `@' and sexp scanning
Previous Next
Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>
Date: Sun, 25 Sep 2016 17:43:02 UTC
Severity: minor
Tags: confirmed
Merged with 11314
Found in versions 24.1.50, 25.1.50, 27.0.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Fri, 12 Apr 2024 13:29:16 -0400
with message-id <jwv1q7a32y1.fsf-monnier+emacs <at> gnu.org>
and subject line Re: bug#24542: 25.1.50; The symbol `@' and sexp scanning
has caused the debbugs.gnu.org bug report #24542,
regarding 25.1.50; The symbol `@' and sexp scanning
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
24542: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24542
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Hi,
the following breaks my "el-search" package when searching in
"skeleton.el". It assumes that calling `scan-sexps' works at the start
of any sexp.
Recipe: in emacs -Q,
insert
(eq element '@)
in an elisp mode buffer (e.g. scratch). Put point at the quote or the
"@". Eval
(goto-char (scan-sexps (point) 1))
and you get an error like:
Debugger entered--Lisp error: (scan-error "Containing expression ends prematurely" 15 16)
scan-sexps(13 1)
(goto-char (scan-sexps (point) 1))
eval((goto-char (scan-sexps (point) 1)) nil)
eval-expression((goto-char (scan-sexps (point) 1)) nil)
funcall-interactively(eval-expression (goto-char (scan-sexps (point) 1)) nil)
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
I think `scan-sexps' should not error. FWIW, if I add one more sexp to
the list after "'@" (different from "'@"), there is no error.
TIA,
Michael.
In GNU Emacs 25.1.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.21.5)
of 2016-09-23 built on drachen
Repository revision: 14c36d76df035faa127580d706a0564f4e496991
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description: Debian GNU/Linux testing (stretch)
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY
LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11
Important settings:
value of $LC_ALL: de_DE.utf8
value of $LC_COLLATE: C
value of $LC_TIME: C
value of $LANG: de_DE.utf8
locale-coding-system: utf-8-unix
Major mode: Emacs-Lisp
[Message part 3 (message/rfc822, inline)]
>> (defvar emacs-lisp-mode-syntax-table
>> (let ((table (make-syntax-table lisp-data-mode-syntax-table)))
>> - ;; These are redundant, now.
>> - ;;(modify-syntax-entry ?\[ "(] " table)
>> - ;;(modify-syntax-entry ?\] ")[ " table)
>> + ;; `syntax-propertize'. takes care of `,@'.
>> + (modify-syntax-entry ?@ "_" table)
>> table)
>> "Syntax table used in `emacs-lisp-mode'.")
>
> This seems to give good results for me - so far at least.
Thanks, pushed to `master`, closing.
Stefan
This bug report was last modified 1 year and 40 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.