align.el marker fix.
* lisp/align.el (align--set-marker): Add doc-string. Don't try to move something that is not a marker. Eg the first call from align-region passes eol == 0. Fixes: debbugs:10216
This commit is contained in:
parent
7dbda6dfe8
commit
58a70b943c
2 changed files with 8 additions and 1 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2011-12-05 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* align.el (align--set-marker): Add doc-string.
|
||||
Don't try to move something that is not a marker. (Bug#10216)
|
||||
|
||||
2011-12-04 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* calendar/appt.el (appt-add): Rewrite the interactive-spec to avoid
|
||||
|
|
|
|||
|
|
@ -1247,7 +1247,9 @@ have been aligned. No changes will be made to the buffer."
|
|||
(setq areas (cdr areas))))))
|
||||
|
||||
(defmacro align--set-marker (marker-var pos &optional type)
|
||||
`(if ,marker-var
|
||||
"If MARKER-VAR is a marker, move it to position POS.
|
||||
Otherwise, create a new marker at position POS, with type TYPE."
|
||||
`(if (markerp ,marker-var)
|
||||
(move-marker ,marker-var ,pos)
|
||||
(setq ,marker-var (copy-marker ,pos ,type))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue