[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30726: [26.0.91 9] optimistic forward-sexp

From: Andreas Röhler
Subject: bug#30726: [26.0.91 9] optimistic forward-sexp
Date: Tue, 6 Mar 2018 08:16:47 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]