diff options
author | Glenn Morris <[email protected]> | 2013-01-03 00:23:10 -0800 |
---|---|---|
committer | Glenn Morris <[email protected]> | 2013-01-03 00:23:10 -0800 |
commit | a6d6c20b920542ec04f2a2616596f61430187132 (patch) | |
tree | b22d83c83d96d2355871e0d29bb486b03ca1c9cf /lisp | |
parent | 0a8bf3afca415fec94742cf830622b22f186062c (diff) |
makefile-fill-paragraph tweak
* lisp/progmodes/make-mode.el (makefile-fill-paragraph): Add doc.
Handle paragraph starting at beginning of buffer.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 3 | ||||
-rw-r--r-- | lisp/progmodes/make-mode.el | 10 |
2 files changed, 9 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0d34da2c04..2b7cb55da8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2013-01-03 Glenn Morris <[email protected]> + * progmodes/make-mode.el (makefile-fill-paragraph): Add doc. + Handle paragraph starting at beginning of buffer. + * subr.el (eval-after-load): Don't purecopy the form, so that it can be nconc'd later on; reverts 2009-11-11 change. (Bug#13331) diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index 793c3bbbf3..8ab4c6f95b 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -1273,9 +1273,9 @@ definition and conveniently use this command." ;; Filling -(defun makefile-fill-paragraph (_arg) - ;; Fill comments, backslashed lines, and variable definitions - ;; specially. +(defun makefile-fill-paragraph (_justify) + "Function used for `fill-paragraph-function' in Makefile mode. +Fill comments, backslashed lines, and variable definitions specially." (save-excursion (beginning-of-line) (cond @@ -1295,7 +1295,9 @@ definition and conveniently use this command." (end-of-line 0) (while (= (preceding-char) ?\\) (end-of-line 0)) - (forward-char) + ;; Maybe we hit bobp, in which case we are not at EOL. + (if (eq (point) (line-end-position)) + (forward-char)) (point))) (end (save-excursion |