[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
align-regexp problem when called from lisp code
From: |
Luca Ferrari |
Subject: |
align-regexp problem when called from lisp code |
Date: |
Thu, 8 Aug 2013 12:34:02 +0200 |
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
- align-regexp problem when called from lisp code,
Luca Ferrari <=
- Re: align-regexp problem when called from lisp code, Tassilo Horn, 2013/08/08
- Re: align-regexp problem when called from lisp code, Luca Ferrari, 2013/08/08
- Re: align-regexp problem when called from lisp code, Luca Ferrari, 2013/08/09
- Re: align-regexp problem when called from lisp code, Tassilo Horn, 2013/08/09
- Re: align-regexp problem when called from lisp code, Luca Ferrari, 2013/08/09
- Re: align-regexp problem when called from lisp code, Tassilo Horn, 2013/08/09
- Re: align-regexp problem when called from lisp code, Luca Ferrari, 2013/08/09