[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111632: * lisp/progmodes/make-mode.e
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111632: * lisp/progmodes/make-mode.el (makefile-backslash-region): Don't compute |
Date: |
Wed, 30 Jan 2013 15:46:10 -0500 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111632
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Wed 2013-01-30 15:46:10 -0500
message:
* lisp/progmodes/make-mode.el (makefile-backslash-region): Don't compute
column if we're just deleting the backslashes.
(makefile-fill-paragraph): Use eolp.
modified:
lisp/ChangeLog
lisp/progmodes/make-mode.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-01-30 19:20:46 +0000
+++ b/lisp/ChangeLog 2013-01-30 20:46:10 +0000
@@ -1,3 +1,9 @@
+2013-01-30 Stefan Monnier <address@hidden>
+
+ * progmodes/make-mode.el (makefile-backslash-region): Don't compute
+ column if we're just deleting the backslashes.
+ (makefile-fill-paragraph): Use eolp.
+
2013-01-30 Michael Albinus <address@hidden>
* autorevert.el (auto-revert-use-notify): Fix docstring.
=== modified file 'lisp/progmodes/make-mode.el'
--- a/lisp/progmodes/make-mode.el 2013-01-03 08:23:10 +0000
+++ b/lisp/progmodes/make-mode.el 2013-01-30 20:46:10 +0000
@@ -1213,26 +1213,23 @@
(save-excursion
(goto-char from)
(let ((column makefile-backslash-column)
- (endmark (make-marker)))
- (move-marker endmark to)
+ (endmark (copy-marker to)))
;; Compute the smallest column number past the ends of all the lines.
- (if makefile-backslash-align
- (progn
- (if (not delete-flag)
- (while (< (point) to)
- (end-of-line)
- (if (= (preceding-char) ?\\)
- (progn (forward-char -1)
- (skip-chars-backward " \t")))
- (setq column (max column (1+ (current-column))))
- (forward-line 1)))
- ;; Adjust upward to a tab column, if that doesn't push
- ;; past the margin.
- (if (> (% column tab-width) 0)
- (let ((adjusted (* (/ (+ column tab-width -1) tab-width)
- tab-width)))
- (if (< adjusted (window-width))
- (setq column adjusted))))))
+ (when (and makefile-backslash-align (not delete-flag))
+ (while (< (point) to)
+ (end-of-line)
+ (if (= (preceding-char) ?\\)
+ (progn (forward-char -1)
+ (skip-chars-backward " \t")))
+ (setq column (max column (1+ (current-column))))
+ (forward-line 1))
+ ;; Adjust upward to a tab column, if that doesn't push
+ ;; past the margin.
+ (if (> (% column tab-width) 0)
+ (let ((adjusted (* (/ (+ column tab-width -1) tab-width)
+ tab-width)))
+ (if (< adjusted (window-width))
+ (setq column adjusted)))))
;; Don't modify blank lines at start of region.
(goto-char from)
(while (and (< (point) endmark) (eolp))
@@ -1296,9 +1293,9 @@
(while (= (preceding-char) ?\\)
(end-of-line 0))
;; Maybe we hit bobp, in which case we are not at EOL.
- (if (eq (point) (line-end-position))
- (forward-char))
- (point)))
+ (if (eolp)
+ (1+ (point))
+ (point))))
(end
(save-excursion
(while (= (preceding-char) ?\\)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111632: * lisp/progmodes/make-mode.el (makefile-backslash-region): Don't compute,
Stefan Monnier <=