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

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

[debbugs-tracker] bug#17761: closed (24.3.91; smie-for-sexp and parenthe


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#17761: closed (24.3.91; smie-for-sexp and parentheses of-by-one bug?)
Date: Fri, 13 Jun 2014 16:15:02 +0000

Your message dated Sat, 14 Jun 2014 00:14:34 +0800
with message-id <address@hidden>
and subject line Re: bug#17761: 24.3.91; smie-for-sexp and parentheses 
of-by-one bug?
has caused the debbugs.gnu.org bug report #17761,
regarding 24.3.91; smie-for-sexp and parentheses of-by-one bug?
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
17761: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17761
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.3.91; smie-for-sexp and parentheses of-by-one bug? Date: Thu, 12 Jun 2014 19:58:20 +0800
1. Open a buffer in octave mode and insert ( ) with point between the
   parentheses

2. Eval (smie-forward-sexp) which should give back something like
   (t 2 ")")

POS is before the token ")" instead of the end position of the token. Is
this a bug? This can often cause infinite loop if one is not careful.

BTW, although smie-config-guess's return value is not documented, it
seems no harm to do something like the following:

=== modified file 'lisp/emacs-lisp/smie.el'
--- lisp/emacs-lisp/smie.el     2014-03-04 08:35:11 +0000
+++ lisp/emacs-lisp/smie.el     2014-06-12 11:20:38 +0000
@@ -2156,7 +2156,7 @@
       (user-error "This buffer does not seem to be using SMIE"))
   (let ((config (smie-config--guess (point-min) (point-max))))
     (cond
-     ((null config) (message "Nothing to change"))
+     ((null config) (message "Nothing to change") nil)
      ((null smie-config--buffer-local)
       (message "Local rules set")
       (setq smie-config--buffer-local config))

Thanks,
Leo



--- End Message ---
--- Begin Message --- Subject: Re: bug#17761: 24.3.91; smie-for-sexp and parentheses of-by-one bug? Date: Sat, 14 Jun 2014 00:14:34 +0800 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (CentOS 6.5)
Fixed 24.4

On 2014-06-13 11:33 -0400, Stefan Monnier wrote:
> Indeed, thanks.  I installed a patch into `emacs-24' which should
> fix this.  As you can see, SMIE is mostly used to parse backward!

Indeed and thanks for the fix.

Leo


--- End Message ---

reply via email to

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