Mercurial > emacs
changeset 108165:5f43377338a0
(progmodes/cc-mode.el) c-extend-region-for-CPP: Fix an off-by-one error
(in end of macro position).
author | Alan Mackenzie <acm@muc.de> |
---|---|
date | Thu, 29 Apr 2010 14:48:32 +0000 |
parents | 745e12b5af4a |
children | 15deb8699a13 |
files | lisp/ChangeLog lisp/progmodes/cc-mode.el |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Apr 29 10:29:09 2010 -0400 +++ b/lisp/ChangeLog Thu Apr 29 14:48:32 2010 +0000 @@ -1,3 +1,8 @@ +2010-04-29 Alan Mackenzie <acm@muc.de> + + * progmodes/cc-mode.el (c-extend-region-for-CPP): Fix an + off-by-one error (in end of macro position). + 2010-04-29 Stefan Monnier <monnier@iro.umontreal.ca> * net/browse-url.el (browse-url-firefox-program): Use iceweasel if
--- a/lisp/progmodes/cc-mode.el Thu Apr 29 10:29:09 2010 -0400 +++ b/lisp/progmodes/cc-mode.el Thu Apr 29 14:48:32 2010 +0000 @@ -818,8 +818,10 @@ (setq c-old-BOM (point)) (goto-char end) - (if (c-beginning-of-macro) - (c-end-of-macro)) + (when (c-beginning-of-macro) + (c-end-of-macro) + (or (eobp) (forward-char))) ; Over the terminating NL which may be marked + ; with a c-cpp-delimiter category property (setq c-old-EOM (point))) (defun c-neutralize-CPP-line (beg end)