emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r111409: makefile-fill-paragraph twea


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111409: makefile-fill-paragraph tweak
Date: Thu, 03 Jan 2013 00:23:10 -0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111409
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Thu 2013-01-03 00:23:10 -0800
message:
  makefile-fill-paragraph tweak
  
  * lisp/progmodes/make-mode.el (makefile-fill-paragraph): Add doc.
  Handle paragraph starting at beginning of buffer.
modified:
  lisp/ChangeLog
  lisp/progmodes/make-mode.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-01-03 02:37:57 +0000
+++ b/lisp/ChangeLog    2013-01-03 08:23:10 +0000
@@ -1,5 +1,8 @@
 2013-01-03  Glenn Morris  <address@hidden>
 
+       * 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)
 

=== modified file 'lisp/progmodes/make-mode.el'
--- a/lisp/progmodes/make-mode.el       2013-01-02 16:13:04 +0000
+++ b/lisp/progmodes/make-mode.el       2013-01-03 08:23:10 +0000
@@ -1273,9 +1273,9 @@
 
 ;; 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 @@
               (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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]