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

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

Re: yasq: unable to edebug-defun


From: Robert Thorpe
Subject: Re: yasq: unable to edebug-defun
Date: 18 Dec 2006 02:30:26 -0800
User-agent: G2/1.0

Mirko wrote:
> Robert Thorpe wrote:
> > Mirko wrote:
> > > Robert Thorpe wrote:
> > > > Mirko wrote:
<snip>

Demonstrating how authoritative my opinion isn't I wrote:-

> > This sounds like a bug to me.  I'm using Emacs21 which doesn't have
> > dump-map, so I can't test your code, but the variable map certainly
> > doesn't look void.  Eval-defun(M-C-x) and Eval-last-sexp(C-xC-e)
> > shouldn't behave differently here.
>
> Well, with your authoritative opinion,I will send this bug to emacs
> developers.  Next year.  Today is my last day before my vacation.

I was wrong.  It seems that M-C-x requires that lisp code be properly
formatted, in particular that the defun is the only thing beginning in
column 1.  If you format the code:-

(defun map-to-buffer (map buffer)
  (interactive)
  (switch-to-buffer buffer)
  (save-excursion
        (save-window-excursion
          (save-match-data
                (widen)
                (goto-char (point-min))
                (insert "\\begin{document}\n")
                (dump-map map)
                (goto-char (point-max))
                (insert "\n\\end{document")
                (indent-region (point-min) (point-max) nil))))))

Then it will work.



reply via email to

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