GNU bug report logs - #8708
24.0.50; up-list broken with custom forward-sexp-function

Previous Next

Package: emacs;

Reported by: Alan Malloy <alan.malloy <at> yieldbuild.com>

Date: Fri, 20 May 2011 19:58:03 UTC

Severity: normal

Found in version 24.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 8708-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Alan Malloy <alan.malloy <at> yieldbuild.com>
Cc: 8708-done <at> debbugs.gnu.org
Subject: Re: bug#8708: 24.0.50;
	up-list broken with custom forward-sexp-function
Date: Mon, 23 May 2011 13:41:19 -0300
>>>>> "Alan" == Alan Malloy <alan.malloy <at> yieldbuild.com> writes:
> Move point back inside parens
> M-: (setq forward-sexp-function
>       (lambda (n)
>         (let ((forward-sexp-function nil))
>           (forward-sexp n))))
> M-x up-list

> Actual behavior:

> Point does not move, signal is raised, and error message is printed:
>       up-list: Scan error: "Unbalanced parentheses", 193, 193

Oops, indeed.  I installed the patch below into trunk, which should
fix it.  Thank you,


        Stefan


=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2011-05-23 15:03:04 +0000
+++ lisp/ChangeLog	2011-05-23 16:39:13 +0000
@@ -1,3 +1,7 @@
+2011-05-23  Stefan Monnier  <monnier <at> iro.umontreal.ca>
+
+	* emacs-lisp/lisp.el (up-list): Fix forward movement (bug#8708).
+
 2011-05-23  Ken Manheimer  <ken.manheimer <at> gmail.com>
 
 	* allout.el (allout-inhibit-auto-fill-on-headline): Create new

=== modified file 'lisp/emacs-lisp/lisp.el'
--- lisp/emacs-lisp/lisp.el	2011-05-12 07:07:06 +0000
+++ lisp/emacs-lisp/lisp.el	2011-05-23 16:37:30 +0000
@@ -149,7 +149,7 @@
               (while (progn (setq pos (point))
                        (forward-sexp inc)
                        (/= (point) pos)))
-            (scan-error (goto-char (nth 2 err))))
+	  (scan-error (goto-char (nth (if (> arg 0) 3 2) err))))
         (if (= (point) pos)
             (signal 'scan-error
                     (list "Unbalanced parentheses" (point) (point)))))




This bug report was last modified 14 years and 20 days ago.

Previous Next


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