bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#8708: 24.0.50; up-list broken with custom forward-sexp-function


From: Stefan Monnier
Subject: bug#8708: 24.0.50; up-list broken with custom forward-sexp-function
Date: Mon, 23 May 2011 13:41:19 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>>>>> "Alan" == Alan Malloy <alan.malloy@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@iro.umontreal.ca>
+
+       * emacs-lisp/lisp.el (up-list): Fix forward movement (bug#8708).
+
 2011-05-23  Ken Manheimer  <ken.manheimer@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)))))





reply via email to

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