unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* align-regexp problem when called from lisp code
@ 2013-08-08 10:34 Luca Ferrari
  2013-08-08 11:32 ` Tassilo Horn
  0 siblings, 1 reply; 8+ messages in thread
From: Luca Ferrari @ 2013-08-08 10:34 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,
if I use (align-regexp) interactively with a region marked all works
as expected, but if I call it from the following piece of lisp:

(defun fluca1978/align-assignments ()
  (interactive )
  (let ( (line-moving-increment) )
    (align-regexp (point) (mark) "=" )
    (deactivate-mark) ) )

I got the following stack trace:

Debugger entered--Lisp error: (error "Marker does not point anywhere")
  align-areas(((#<marker (moves after insertion) in no buffer> .
#<marker (moves after insertion) in no buffer>) (#<marker (moves after
insertion) in no buffer> . #<marker (moves after insertion) in no
buffer>) (#<marker (moves after insertion) in no buffer> . #<marker
(moves after insertion) in no buffer>) (#<marker (moves after
insertion) in no buffer> . #<marker (moves after insertion) in no
buffer>) (#<marker (moves after insertion) in no buffer> . #<marker
(moves after insertion) in no buffer>) (#<marker (moves after
insertion) in no buffer> . #<marker (moves after insertion) in no
buffer>) (#<marker (moves after insertion) in no buffer> . #<marker
(moves after insertion) in no buffer>) (#<marker (moves after
insertion) in no buffer> . #<marker (moves after insertion) in no
buffer>) (#<marker (moves after insertion) in no buffer> . #<marker
(moves after insertion) in no buffer>) (#<marker (moves after
insertion) in no buffer> . #<marker (moves after insertion) in no
buffer>)) (1) (nil (regexp . "=") (group . 1) (bogus) (spacing . 1)
(repeat)) nil)
  align-region(5171 5775 entire ((nil (regexp . "=") (group . 1)
(bogus) (spacing . 1) (repeat))) nil nil)
  align-regexp(5171 5775 "=")
  (let ((line-moving-increment)) (align-regexp (point) (mark) "=")
(deactivate-mark))
  fluca1978/align-assignments()
  call-interactively(fluca1978/align-assignments t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)


What am I missing?

Thanks,
Luca



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-08-09 10:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-08 10:34 align-regexp problem when called from lisp code Luca Ferrari
2013-08-08 11:32 ` Tassilo Horn
2013-08-08 11:57   ` Luca Ferrari
2013-08-09  6:08     ` Luca Ferrari
2013-08-09  8:13       ` Tassilo Horn
2013-08-09  8:45         ` Luca Ferrari
2013-08-09  9:40           ` Tassilo Horn
2013-08-09 10:03             ` Luca Ferrari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).