unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: 30726@debbugs.gnu.org
Subject: bug#30726: [26.0.91 9] optimistic forward-sexp
Date: Tue, 6 Mar 2018 08:16:47 +0100	[thread overview]
Message-ID: <fe9c604c-1a9f-c1c3-09e2-94e1c8742d94@easy-emacs.de> (raw)

In GNU Emacs 26.0.91 (build 1, i686-pc-linux-gnu, GTK+ Version 3.14.5)
  of 2018-01-27

 From 
https://emacs.stackexchange.com/questions/39253/sh-mode-scan-error-containing-expression-ends-prematurely

Error occurs when forward-sexp is called from closing paren at last line 
of example code below

(echo '#!/bin/bash'
echo 'myfunc() {'
echo "cat <<'z'"
seq 135
echo zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
echo z
echo '}') >out

Bug-source is in but-last line of the def in lisp.el, where

     (goto-char (or (scan-sexps (point) arg) (buffer-end arg)))

scan-sexps sends the error.

Wrapping in into (ignore-errors...


(or (ignore-errors (scan-sexps (point) arg))

makes it gone.

Cheers,

Andreas






             reply	other threads:[~2018-03-06  7:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06  7:16 Andreas Röhler [this message]
2018-03-06  7:47 ` bug#30726: [26.0.91 9] optimistic forward-sexp Glenn Morris
2018-03-06 10:43   ` Andreas Röhler
2021-08-12 14:20     ` Lars Ingebrigtsen
2018-03-06 10:47   ` Andreas Röhler

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=fe9c604c-1a9f-c1c3-09e2-94e1c8742d94@easy-emacs.de \
    --to=andreas.roehler@easy-emacs.de \
    --cc=30726@debbugs.gnu.org \
    /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).