[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100513: Fix 2011-01-31 change; pa
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100513: Fix 2011-01-31 change; patch supplied by acm was applied incorrectly. |
Date: |
Mon, 07 Mar 2011 15:05:53 -0500 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 100513
committer: Chong Yidong <address@hidden>
branch nick: emacs-23
timestamp: Mon 2011-03-07 15:05:53 -0500
message:
Fix 2011-01-31 change; patch supplied by acm was applied incorrectly.
* lisp/progmodes/cc-cmds.el (c-beginning-of-statement): Fix 2011-01-31
change; patch supplied by Alan Mackenzie was applied incorrectly.
modified:
lisp/ChangeLog
lisp/progmodes/cc-cmds.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-03-07 05:20:23 +0000
+++ b/lisp/ChangeLog 2011-03-07 20:05:53 +0000
@@ -4,8 +4,8 @@
2011-03-07 Chong Yidong <address@hidden>
- * progmodes/cc-cmds.el (c-beginning-of-statement): Revert
- 2011-01-31 change.
+ * progmodes/cc-cmds.el (c-beginning-of-statement): Fix 2011-01-31
+ change; patch supplied by Alan Mackenzie was applied incorrectly.
2011-02-26 Eli Zaretskii <address@hidden>
=== modified file 'lisp/progmodes/cc-cmds.el'
--- a/lisp/progmodes/cc-cmds.el 2011-03-07 05:20:23 +0000
+++ b/lisp/progmodes/cc-cmds.el 2011-03-07 20:05:53 +0000
@@ -2458,13 +2458,15 @@
(goto-char last)
(throw 'done '(nil . nil)))
- ;; Stop if we encounter a preprocessor line.
- ((and (not macro-end)
+ ;; Stop if we encounter a preprocessor line. Continue if we
+ ;; hit a naked #
+ ((and c-opt-cpp-prefix
+ (not macro-end)
(eq (char-after) ?#)
(= (point) (c-point 'boi)))
- (goto-char last)
- ;(throw 'done (cons (eq (point) here) 'macro-boundary))) ; Changed
2003/3/26
- (throw 'done '(t . macro-boundary)))
+ (if (= (point) here) ; Not a macro, therefore naked #.
+ (forward-char)
+ (throw 'done '(t . macro-boundary))))
;; Stop after a ';', '}', or "};"
((looking-at ";\\|};?")
@@ -2663,14 +2665,19 @@
;; Are we about to move forward into or out of a
;; preprocessor command?
(when (eq (cdr res) 'macro-boundary)
- (save-excursion
- (end-of-line)
- (setq macro-fence
- (and (not (eobp))
- (progn (c-skip-ws-forward)
- (c-beginning-of-macro))
- (progn (c-end-of-macro)
- (point))))))
+ (setq macro-fence
+ (save-excursion
+ (if macro-fence
+ (progn
+ (end-of-line)
+ (and (not (eobp))
+ (progn (c-skip-ws-forward)
+ (c-beginning-of-macro))
+ (progn (c-end-of-macro)
+ (point))))
+ (and (not (eobp))
+ (c-beginning-of-macro)
+ (progn (c-end-of-macro) (point)))))))
;; Are we about to move forward into a literal?
(when (memq (cdr res) '(macro-boundary literal))
(setq range (c-ascertain-following-literal)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100513: Fix 2011-01-31 change; patch supplied by acm was applied incorrectly.,
Chong Yidong <=