Problems with (beginning-of-defun):

Cursor at roof-sign

(when t
 (defun foo ()
   " "
   (interactive)
   (message "%s" "baz")))
^ M-x beginning-of-defun

==>

(when t
^  (defun foo ()
   " "
   (interactive)
   (message "%s" "baz")))

Wrong, as at the start of the enclosing form.

Set `defun-prompt-regexp' via customize at

[ \t]*

(when t
 (defun foo ()
   " "
   (interactive)
   (message "%s" "baz")))
^ M-x beginning-of-defun

==>

(when t
 (defun foo ()
   " "
   (interactive)
   (message "%s" "baz")))
^

Also wrong: cursor at the beginning of line now.


The reason seems the conception of the variable
`defun-prompt-regexp' which solely takes spaces before the defuns
beginning in consideration.

It could be avoided, if this var would take instead of

`a regexp to ignore before a defun'

a regexp `describing the beginning of a defun'

Then we could specify "[ \t]*(defun" for example in Emacs Lisp
mode and it would not fail if we are inside a defun or just after
it already.

__
Andreas Roehler



_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to