emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-mode.el, v [EMACS_22_BA


From: Alan Mackenzie
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-mode.el, v [EMACS_22_BASE]
Date: Wed, 20 Feb 2008 22:18:29 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Branch:         EMACS_22_BASE
Changes by:     Alan Mackenzie <acmacm> 08/02/20 22:18:28

Index: cc-mode.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/cc-mode.el,v
retrieving revision 1.58.2.6
retrieving revision 1.58.2.7
diff -u -b -r1.58.2.6 -r1.58.2.7
--- cc-mode.el  19 Feb 2008 22:14:40 -0000      1.58.2.6
+++ cc-mode.el  20 Feb 2008 22:18:28 -0000      1.58.2.7
@@ -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




reply via email to

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