diff options
| author | Stefan Monnier | 2013-01-30 15:46:10 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2013-01-30 15:46:10 -0500 |
| commit | c56d2269c288cc6baa1926dd9f781f34656cc1cf (patch) | |
| tree | ad37f00945815a48b28b7f4a8a4f794676cd7956 | |
| parent | 382936d1460c215c93fd2d8b9ae15b118fd1e90c (diff) | |
| download | emacs-c56d2269c288cc6baa1926dd9f781f34656cc1cf.tar.gz emacs-c56d2269c288cc6baa1926dd9f781f34656cc1cf.zip | |
* lisp/progmodes/make-mode.el (makefile-backslash-region): Don't compute
column if we're just deleting the backslashes.
(makefile-fill-paragraph): Use eolp.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/progmodes/make-mode.el | 41 |
2 files changed, 25 insertions, 22 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fb9effbc694..e222e17ed07 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2013-01-30 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * progmodes/make-mode.el (makefile-backslash-region): Don't compute | ||
| 4 | column if we're just deleting the backslashes. | ||
| 5 | (makefile-fill-paragraph): Use eolp. | ||
| 6 | |||
| 1 | 2013-01-30 Michael Albinus <michael.albinus@gmx.de> | 7 | 2013-01-30 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 8 | ||
| 3 | * autorevert.el (auto-revert-use-notify): Fix docstring. | 9 | * autorevert.el (auto-revert-use-notify): Fix docstring. |
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index 8ab4c6f95b6..be718135f99 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el | |||
| @@ -1213,26 +1213,23 @@ definition and conveniently use this command." | |||
| 1213 | (save-excursion | 1213 | (save-excursion |
| 1214 | (goto-char from) | 1214 | (goto-char from) |
| 1215 | (let ((column makefile-backslash-column) | 1215 | (let ((column makefile-backslash-column) |
| 1216 | (endmark (make-marker))) | 1216 | (endmark (copy-marker to))) |
| 1217 | (move-marker endmark to) | ||
| 1218 | ;; Compute the smallest column number past the ends of all the lines. | 1217 | ;; Compute the smallest column number past the ends of all the lines. |
| 1219 | (if makefile-backslash-align | 1218 | (when (and makefile-backslash-align (not delete-flag)) |
| 1220 | (progn | 1219 | (while (< (point) to) |
| 1221 | (if (not delete-flag) | 1220 | (end-of-line) |
| 1222 | (while (< (point) to) | 1221 | (if (= (preceding-char) ?\\) |
| 1223 | (end-of-line) | 1222 | (progn (forward-char -1) |
| 1224 | (if (= (preceding-char) ?\\) | 1223 | (skip-chars-backward " \t"))) |
| 1225 | (progn (forward-char -1) | 1224 | (setq column (max column (1+ (current-column)))) |
| 1226 | (skip-chars-backward " \t"))) | 1225 | (forward-line 1)) |
| 1227 | (setq column (max column (1+ (current-column)))) | 1226 | ;; Adjust upward to a tab column, if that doesn't push |
| 1228 | (forward-line 1))) | 1227 | ;; past the margin. |
| 1229 | ;; Adjust upward to a tab column, if that doesn't push | 1228 | (if (> (% column tab-width) 0) |
| 1230 | ;; past the margin. | 1229 | (let ((adjusted (* (/ (+ column tab-width -1) tab-width) |
| 1231 | (if (> (% column tab-width) 0) | 1230 | tab-width))) |
| 1232 | (let ((adjusted (* (/ (+ column tab-width -1) tab-width) | 1231 | (if (< adjusted (window-width)) |
| 1233 | tab-width))) | 1232 | (setq column adjusted))))) |
| 1234 | (if (< adjusted (window-width)) | ||
| 1235 | (setq column adjusted)))))) | ||
| 1236 | ;; Don't modify blank lines at start of region. | 1233 | ;; Don't modify blank lines at start of region. |
| 1237 | (goto-char from) | 1234 | (goto-char from) |
| 1238 | (while (and (< (point) endmark) (eolp)) | 1235 | (while (and (< (point) endmark) (eolp)) |
| @@ -1296,9 +1293,9 @@ Fill comments, backslashed lines, and variable definitions specially." | |||
| 1296 | (while (= (preceding-char) ?\\) | 1293 | (while (= (preceding-char) ?\\) |
| 1297 | (end-of-line 0)) | 1294 | (end-of-line 0)) |
| 1298 | ;; Maybe we hit bobp, in which case we are not at EOL. | 1295 | ;; Maybe we hit bobp, in which case we are not at EOL. |
| 1299 | (if (eq (point) (line-end-position)) | 1296 | (if (eolp) |
| 1300 | (forward-char)) | 1297 | (1+ (point)) |
| 1301 | (point))) | 1298 | (point)))) |
| 1302 | (end | 1299 | (end |
| 1303 | (save-excursion | 1300 | (save-excursion |
| 1304 | (while (= (preceding-char) ?\\) | 1301 | (while (= (preceding-char) ?\\) |