[Top][All Lists]

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

Re: yasq: unable to edebug-defun

From: Kevin Rodgers
Subject: Re: yasq: unable to edebug-defun
Date: Mon, 18 Dec 2006 15:20:46 -0700
User-agent: Thunderbird (Windows/20061025)

Mirko wrote:
Robert Thorpe wrote:
Mirko wrote:

This could be due to my incompetence, senility or just lack of emacs
knowledge: I cannot compile my defun's.  If I try to do either M-C-x or
C-u M-C-x, emacs tries to evaluate the defun in which my cursor
resides, instead of compiling it.
That's the normal behaviour M-C-x evals a defun, which means it stores
the code for the function inside emacs.
C-u M-C-x evaluates it also instrumenting it for edebug.

I tried also M-x edebug-defun, but then the debugger immediately tries
to step through the function instead of instrumenting it.
The debugger should not be triggered immediately.
Maybe you have the wrong number of parenthesis in the buffer you're
using, try turning on show-paren-mode to check.

You have to have point at the end of some function Like
(defun foo () (print "bar"))POINT then hit M-C-x.

Bytecode compilation is only used through byte-compile-file normally.


I tried your suggestions, and (other than learning about the
show-paren-mode) no luck.

Here is my example defun (this is for example only, I get similar
behavior with other defuns)

(defun map-to-buffer (map buffer)
(switch-to-buffer buffer)
      (goto-char (point-min))
      (insert "\\begin{document}\n"

You are missing a close parenthesis at the end of the `(insert ...'

      (dump-map map)
      (goto-char (point-max))
      (insert "\n\\end{document")

I think you want a right brace after `"{document'.

      (indent-region (point-min) (point-max) nil)

If I put it into *scratch* to avoid interference with other dangling
parenthesis (which I did not find) and put the point after the last
parenthesis and do M-C-x, I get:
Debugger entered--Lisp error: (void-variable map)
  (dump-map map)
  (insert "\\begin{document}\n" (dump-map map) (goto-char (point-max))
(insert "\n\\end{document") (indent-region (point-min) (point-max)
  (progn (widen) (goto-char (point-min)) (insert "\\begin{document}\n"
(dump-map map) (goto-char ...) (insert "\n\\end{document")
(indent-region ... ... nil)))
  (unwind-protect (progn (widen) (goto-char ...) (insert
"\\begin{document}\n" ... ... ... ...)) (set-match-data
save-match-data-internal (quote evaporate)))
  (let ((save-match-data-internal ...)) (unwind-protect (progn ... ...
...) (set-match-data save-match-data-internal ...)))
  (save-match-data (widen) (goto-char (point-min)) (insert
"\\begin{document}\n" (dump-map map) (goto-char ...) (insert
"\n\\end{document") (indent-region ... ... nil)))
  (save-window-excursion (save-match-data (widen) (goto-char ...)
(insert "\\begin{document}\n" ... ... ... ...)))
  (save-excursion (save-window-excursion (save-match-data ... ...
  eval((save-excursion (save-window-excursion (save-match-data ... ...

If I do C-u M-C-x, then I get the pointer next to the (save-excursion
... statement.  That is not at the first executable statement
(switch-to-buffer buffer)

If I do a C-x C-e I get map-to-buffer in the message window (which is
what I would expect).

My key bindings are
M-C-x: eval-defun
C-x C-e: eval-last-sexp

The output of the emacs bug report (I still think it is some error in
my setup or actions) is:
In GNU Emacs (i386-mingw-nt5.1.2600)
 of 2006-11-05 on NEUTRINO
X server distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  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: ENU
  locale-coding-system: cp1252
  default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  shell-dirtrack-mode: t
  desktop-save-mode: t
  encoded-kbd-mode: t
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t




reply via email to

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