unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Evgeny Zajcev <lg.zevlg@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: elisp--local-variables triggers an error on special input
Date: Tue, 01 Dec 2020 10:45:25 -0500	[thread overview]
Message-ID: <jwv8sahsf94.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAO=W_Zp6D6e=GpfMPYGdcM+eynx+w6A3YAO4NM8cvrfF1E4qdQ@mail.gmail.com> (Evgeny Zajcev's message of "Tue, 1 Dec 2020 15:53:05 +0300")

> I've noticed that sometimes company raises an error in my *scratch*, I've
> shrinked the case and got:
> (with-current-buffer (get-buffer-create "pwp")
>   (erase-buffer)
>   (insert "((eg \"\C-,\")")
>   (elisp--local-variables))
> Evaluating this sexp raises "Invalid modifier in string" error
> Not sure this is intended, I think elisp--local-variables expects
> `invalid-read-syntax` error for this input, but got another error and does
> not handle it preventing error from happening

Clearly, `elisp--local-variables` should catch this error, but as you
point out, maybe the better way to do that is to change the error that
is signaled so that it is a child of `invalid-read-syntax`.


        Stefan




  parent reply	other threads:[~2020-12-01 15:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01 12:53 elisp--local-variables triggers an error on special input Evgeny Zajcev
2020-12-01 13:15 ` Joost Kremers
2020-12-01 14:24   ` tomas
2020-12-01 14:36     ` Joost Kremers
2020-12-01 20:16       ` tomas
2020-12-01 14:42     ` Gregory Heytings via Emacs development discussions.
2020-12-01 15:45 ` Stefan Monnier [this message]
2020-12-17  8:30   ` Evgeny Zajcev
2020-12-17 15:43     ` Stefan Monnier
2020-12-29  7:06       ` Evgeny Zajcev
2021-01-03  2:47         ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv8sahsf94.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=lg.zevlg@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).