emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r102165: progmodes/cc-cmds.el (c-mask


From: Alan Mackenzie
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102165: progmodes/cc-cmds.el (c-mask-paragraph): Fix an off-by-1 error. Fixes
Date: Sun, 31 Oct 2010 11:54:02 +0000
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102165
committer: Alan Mackenzie <address@hidden>
branch nick: trunk
timestamp: Sun 2010-10-31 11:54:02 +0000
message:
  progmodes/cc-cmds.el (c-mask-paragraph): Fix an off-by-1 error.  Fixes
  bug #7185.
modified:
  lisp/ChangeLog
  lisp/progmodes/cc-cmds.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-10-31 00:06:18 +0000
+++ b/lisp/ChangeLog    2010-10-31 11:54:02 +0000
@@ -1,3 +1,8 @@
+2010-10-31  Alan Mackenzie  <address@hidden>
+
+       * progmodes/cc-cmds.el (c-mask-paragraph): Fix an off-by-1 error.
+       This fixes bug #7185.
+
 2010-10-30  Chong Yidong  <address@hidden>
 
        * startup.el (command-line): Search for package directories, and

=== modified file 'lisp/progmodes/cc-cmds.el'
--- a/lisp/progmodes/cc-cmds.el 2010-08-29 16:17:13 +0000
+++ b/lisp/progmodes/cc-cmds.el 2010-10-31 11:54:02 +0000
@@ -3974,17 +3974,19 @@
                    ;; "Invalid search bound (wrong side of point)"
                    ;; error in the subsequent re-search.  Maybe
                    ;; another fix would be needed (2007-12-08).
-                   (or (<= (- (cdr c-lit-limits) 2) (point))
-                       (and 
-                        (search-forward-regexp
-                         (concat "\\=[ \t]*\\(" c-current-comment-prefix "\\)")
-                         (- (cdr c-lit-limits) 2) t)
-                        (not (search-forward-regexp
-                              "\\(\\s \\|\\sw\\)"
-                              (- (cdr c-lit-limits) 2) 'limit))
-                        ;; The comment ender IS on its own line.  Exclude
-                        ;; this line from the filling.
-                        (set-marker end (c-point 'bol)))))
+;                  (or (<= (- (cdr c-lit-limits) 2) (point))
+; 2010-10-17  Construct removed.
+;                  (or (< (- (cdr c-lit-limits) 2) (point))
+                   (and 
+                    (search-forward-regexp
+                     (concat "\\=[ \t]*\\(" c-current-comment-prefix "\\)")
+                     (- (cdr c-lit-limits) 2) t)
+                    (not (search-forward-regexp
+                          "\\(\\s \\|\\sw\\)"
+                          (- (cdr c-lit-limits) 2) 'limit))
+                    ;; The comment ender IS on its own line.  Exclude this
+                    ;; line from the filling.
+                    (set-marker end (c-point 'bol))));)
 
                ;; The comment ender is hanging.  Replace all space between it
                ;; and the last word either by one or two 'x's (when


reply via email to

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