diff options
| author | Alan Mackenzie | 2010-07-31 09:39:24 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2010-07-31 09:39:24 +0000 |
| commit | 28e5cf7c6afc606436f6a6df448cd582e92867d7 (patch) | |
| tree | 43d23c205fdd2d63f1965f6fcb1f91aaa466dfa5 | |
| parent | 2c09a58f7e64af426e8484d510dc781e6da3e09d (diff) | |
| download | emacs-28e5cf7c6afc606436f6a6df448cd582e92867d7.tar.gz emacs-28e5cf7c6afc606436f6a6df448cd582e92867d7.zip | |
cc-cmds.el (c-mask-paragraph): Fix bug #6688, Auto-fill broken in C/C++
modes.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/progmodes/cc-cmds.el | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f0332db2c9f..151fe8da2be 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-07-31 Alan Mackenzie <acm@muc.de> | ||
| 2 | |||
| 3 | * progmodes/cc-cmds.el (c-mask-paragraph): Fix bug #6688: | ||
| 4 | Auto-fill broken in C/C++ modes. | ||
| 5 | |||
| 1 | 2010-07-29 Jan Djärv <jan.h.d@swipnet.se> | 6 | 2010-07-29 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 7 | ||
| 3 | * menu-bar.el (menu-bar-showhide-tool-bar-menu-customize-enable-left) | 8 | * menu-bar.el (menu-bar-showhide-tool-bar-menu-customize-enable-left) |
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 10267a6b2dc..6d4479cb204 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el | |||
| @@ -3974,16 +3974,17 @@ command to conveniently insert and align the necessary backslashes." | |||
| 3974 | ;; "Invalid search bound (wrong side of point)" | 3974 | ;; "Invalid search bound (wrong side of point)" |
| 3975 | ;; error in the subsequent re-search. Maybe | 3975 | ;; error in the subsequent re-search. Maybe |
| 3976 | ;; another fix would be needed (2007-12-08). | 3976 | ;; another fix would be needed (2007-12-08). |
| 3977 | (and (> (- (cdr c-lit-limits) 2) (point)) | 3977 | (or (<= (- (cdr c-lit-limits) 2) (point)) |
| 3978 | (and | ||
| 3978 | (search-forward-regexp | 3979 | (search-forward-regexp |
| 3979 | (concat "\\=[ \t]*\\(" c-current-comment-prefix "\\)") | 3980 | (concat "\\=[ \t]*\\(" c-current-comment-prefix "\\)") |
| 3980 | (- (cdr c-lit-limits) 2) t) | 3981 | (- (cdr c-lit-limits) 2) t) |
| 3981 | (not (search-forward-regexp | 3982 | (not (search-forward-regexp |
| 3982 | "\\(\\s \\|\\sw\\)" | 3983 | "\\(\\s \\|\\sw\\)" |
| 3983 | (- (cdr c-lit-limits) 2) 'limit)) | 3984 | (- (cdr c-lit-limits) 2) 'limit)) |
| 3984 | ;; The comment ender IS on its own line. Exclude | 3985 | ;; The comment ender IS on its own line. Exclude |
| 3985 | ;; this line from the filling. | 3986 | ;; this line from the filling. |
| 3986 | (set-marker end (c-point 'bol)))) | 3987 | (set-marker end (c-point 'bol))))) |
| 3987 | 3988 | ||
| 3988 | ;; The comment ender is hanging. Replace all space between it | 3989 | ;; The comment ender is hanging. Replace all space between it |
| 3989 | ;; and the last word either by one or two 'x's (when | 3990 | ;; and the last word either by one or two 'x's (when |