changeset 80170:3e4f6980296d

(c-extend-region-for-CPP): always set c-old-EOM.
author Alan Mackenzie <acm@muc.de>
date Wed, 20 Feb 2008 22:18:28 +0000
parents 4a375bdd751d
children 97019d686b43
files lisp/progmodes/cc-mode.el
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/cc-mode.el	Wed Feb 20 22:16:05 2008 +0000
+++ b/lisp/progmodes/cc-mode.el	Wed Feb 20 22:18:28 2008 +0000
@@ -767,8 +767,8 @@
 (make-variable-buffer-local 'c-old-EOM)
 
 (defun c-extend-region-for-CPP (beg end)
-  ;; If either BEG or END is inside a preprocessor (logical) line, set
-  ;; c-old-BOM or c-ole-EOM respectively to the beginning/end of the line.
+  ;; Set c-old-BOM or c-old-EOM respectively to BEG, END, each extended to the
+  ;; beginning/end of any preprocessor construct they may be in.
   ;;
   ;; Point is undefined both before and after this function call; the buffer
   ;; has already been widened, and match-data saved.  The return value is
@@ -782,9 +782,9 @@
   (setq c-old-BOM (point))
 
   (goto-char end)
-  (when (c-beginning-of-macro)
-    (c-end-of-macro)
-    (setq c-old-EOM (point))))
+  (if (c-beginning-of-macro)
+    (c-end-of-macro))
+  (setq c-old-EOM (point)))
 
 (defun c-neutralize-CPP-line (beg end)
   ;; BEG and END bound a preprocessor line.  Put a "punctuation" syntax-table