GNU bug report logs - #283
scan-error for keyboard macro

Previous Next

Package: emacs;

Reported by: "Roland Winkler" <Roland.Winkler <at> physik.uni-erlangen.de>

Date: Tue, 20 May 2008 07:15:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (Emacs bug Tracking System)
To: "Roland Winkler" <Roland.Winkler <at> physik.uni-erlangen.de>
Subject: bug#283 closed by Stefan Monnier <monnier <at> iro.umontreal.ca> (Re: 
 bug#283: scan-error for keyboard macro)
[Message part 1 (text/plain, inline)]
This is an automatic notification regarding your bug report
which was filed against the emacs package:

#283: scan-error for keyboard macro

It has been closed by Stefan Monnier <monnier <at> iro.umontreal.ca>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Stefan Monnier <monnier <at> iro.umontreal.ca> by
replying to this email.


-- 
283: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=283
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: 283-done <at> debbugs.gnu.org
Subject: Re: bug#283: scan-error for keyboard macro
Date: Wed, 21 May 2008 11:36:16 -0400
>> The problem is a known one: the emacs-lisp-mode and its
>> syntax-table does not properly recognize all the escaping going on
>> in character constants. E.g. in ?\C-[, the mode thinks this opens
>> a square bracket expression. If you add \ in front of the [ the
>> problem will disappear.

> Thanks a lot, if the backslash in front of the [ can solve this
> problem, then this is even an adequate fix for an existing
> collection of keyboard macros.

Yes, that should fix it.

> I loaded the file that contains my keyboard macros and I created it
> again with the patched version of insert-kbd-macro. The only
> difference between the old and new file was the \ in front of the [.
> So on that level I can say that your patch has fixed my problem with
> apparently no undesired side effects.

Thanks, installed,


        Stefan

[Message part 3 (message/rfc822, inline)]
From: "Roland Winkler" <Roland.Winkler <at> physik.uni-erlangen.de>
To: bug-gnu-emacs <at> gnu.org
Subject: scan-error for keyboard macro
Date: Tue, 20 May 2008 09:06:19 +0200
The following piece of code was generated with insert-kbd-macro

(fset 'foo
   [?\C-[ ?f ?\C-[ ?  ?\C-[ ?b ?\C-[ ?w ?\C-x ?o ?\C-x ?\C-v left left ?\C-@ ?\C-r ?/ ?\C-m ?\C-w ?/ ?\C-y ?\C-[ ?y ?\C-m ?\C-x ?o])

If you put it into a file and load the file, the macro is available.
If you put point at the end of the macro definition and execute
C-x C-e (eval-last-sexp) this does not allow you to load the macro
(though eval-last-sexp doesn't throw an error, in the end the
macro foo is not available). If you put point inside the macro
definition and type C-M-x (eval-defun) it throws the error

(scan-error "Unbalanced parentheses" 1 145)

In GNU Emacs 22.2.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2008-03-27 on tfkp07
configured using `configure  '--with-x''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: C
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.iso885915
  locale-coding-system: iso-8859-15
  default-enable-multibyte-characters: nil




This bug report was last modified 17 years and 65 days ago.

Previous Next


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