GNU bug report logs - #30726
[26.0.91 9] optimistic forward-sexp

Previous Next

Package: emacs;

Reported by: Andreas Röhler <andreas.roehler <at> easy-emacs.de>

Date: Tue, 6 Mar 2018 07:18:01 UTC

Severity: minor

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: bug-gnu-emacs <at> gnu.org
Subject: [26.0.91 9] optimistic forward-sexp
Date: Tue, 6 Mar 2018 08:16:47 +0100
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





This bug report was last modified 3 years and 286 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.