emacs-devel
[Top][All Lists]
Advanced

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

Re: 23.0.50; ielm doesn't handle comments


From: Bastien Guerry
Subject: Re: 23.0.50; ielm doesn't handle comments
Date: Thu, 14 Feb 2008 18:33:45 +0000
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     while using ielm in emacs 23.0.50 and emacs 22.1, any code run in ielm
>     with a comment will cause ielm to fail:
>
>     ELISP> (message "hi") ;;ouch
>     *** IELM error ***  More than one sexp in input
>
> This isn't a terribly important bug, but it would be nice
> to fix it.

This simple patch fixes it.  

--- ielm.el.~1.58.~     2008-01-08 20:44:50.000000000 +0000
+++ ielm.el     2008-02-14 18:31:34.000000000 +0000
@@ -331,6 +331,9 @@
        (progn
          (condition-case err
              (let (rout)
+               ;; Make sure there is no comment at the end of the sexp
+               (when (string-match "\\(.*)\\)[ \t]*;+.*$" ielm-string)
+                 (setq ielm-string (replace-match "\\1" t nil ielm-string)))
                (setq rout (read-from-string ielm-string))
                (setq ielm-form (car rout))
                (setq ielm-pos (cdr rout)))
-- 
Bastien

reply via email to

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