diff options
| author | Glenn Morris | 2011-12-04 18:47:53 -0800 |
|---|---|---|
| committer | Glenn Morris | 2011-12-04 18:47:53 -0800 |
| commit | 58a70b943c3efcc25e1396c8e67bc440c43a3f0a (patch) | |
| tree | 85bd5aa3d118733064cadf40f5a4ea6dc153d163 | |
| parent | 7dbda6dfe8058e6abcaf2436277b9beae7605e20 (diff) | |
| download | emacs-58a70b943c3efcc25e1396c8e67bc440c43a3f0a.tar.gz emacs-58a70b943c3efcc25e1396c8e67bc440c43a3f0a.zip | |
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
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/align.el | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e1fa6c6ec31..413a2947a58 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-12-05 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * align.el (align--set-marker): Add doc-string. | ||
| 4 | Don't try to move something that is not a marker. (Bug#10216) | ||
| 5 | |||
| 1 | 2011-12-04 Glenn Morris <rgm@gnu.org> | 6 | 2011-12-04 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * calendar/appt.el (appt-add): Rewrite the interactive-spec to avoid | 8 | * calendar/appt.el (appt-add): Rewrite the interactive-spec to avoid |
diff --git a/lisp/align.el b/lisp/align.el index 0d9f351b9da..a386b7a82ba 100644 --- a/lisp/align.el +++ b/lisp/align.el | |||
| @@ -1247,7 +1247,9 @@ have been aligned. No changes will be made to the buffer." | |||
| 1247 | (setq areas (cdr areas)))))) | 1247 | (setq areas (cdr areas)))))) |
| 1248 | 1248 | ||
| 1249 | (defmacro align--set-marker (marker-var pos &optional type) | 1249 | (defmacro align--set-marker (marker-var pos &optional type) |
| 1250 | `(if ,marker-var | 1250 | "If MARKER-VAR is a marker, move it to position POS. |
| 1251 | Otherwise, create a new marker at position POS, with type TYPE." | ||
| 1252 | `(if (markerp ,marker-var) | ||
| 1251 | (move-marker ,marker-var ,pos) | 1253 | (move-marker ,marker-var ,pos) |
| 1252 | (setq ,marker-var (copy-marker ,pos ,type)))) | 1254 | (setq ,marker-var (copy-marker ,pos ,type)))) |
| 1253 | 1255 | ||