Emacs: narrow-to-defun, eval-defun, bug
when coding elisp, there's
eval-defun. They do not always work.
For them to work, they require that your code be already formatted in the standard elisp convention.
Here's a example.
This is more serious if you are habituated in calling
eval-defun, because it may eval only part of the code.
As a consequence, i never use them.
Here's the code you can try. Paste the following in a new buffer, call
emacs-lisp-mode. Put cursor before the “3”, then call
;; some (defun xxtest () "..." (interactive) (let (x) (setq x [ 3 4 ]))) ;; more
This is emacs GNU Emacs 24.4.1. But is in emacs 23.x, and i think earlier too.
or, buy something from Best Keyboard for Emacs