summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-07-18 02:11:28 +0000
committerRichard M. Stallman <rms@gnu.org>1997-07-18 02:11:28 +0000
commit529c99615f8140000a370ab1a68a0dd4d57a4833 (patch)
tree831116e64ccf001e6f6b88ac36d83a56d74b0fe8
parent02b37768e408fc2643ecf0330514e425c47c0450 (diff)
downloademacs-529c99615f8140000a370ab1a68a0dd4d57a4833.tar.gz
(c-maybe-labelp): Add defvar.
-rw-r--r--lisp/progmodes/cc-engine.el32
1 files changed, 19 insertions, 13 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 3ac0ed52b74..2c3b22cd249 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -7,7 +7,7 @@
;; 1985 Richard M. Stallman
;; Maintainer: cc-mode-help@python.org
;; Created: 22-Apr-1997 (split from cc-mode.el)
-;; Version: 5.12
+;; Version: 5.13
;; Keywords: c languages oop
;; This file is part of GNU Emacs.
@@ -28,21 +28,27 @@
;; Boston, MA 02111-1307, USA.
-;; WARNING: Be *exceptionally* careful about modifications to this
-;; function! Much of CC Mode depends on this Doing The Right Thing.
-;; If you break it you will be sorry.
+;; KLUDGE ALERT: c-maybe-labelp is used to pass information between
+;; c-crosses-statement-barrier-p and c-beginning-of-statement-1. A
+;; better way should be implemented, but this will at least shut up
+;; the byte compiler.
+(defvar c-maybe-labelp nil)
+
+;; WARNING WARNING WARNING
+;;
+;; Be *exceptionally* careful about modifications to this function!
+;; Much of CC Mode depends on this Doing The Right Thing. If you
+;; break it you will be sorry. If you think you know how this works,
+;; you probably don't. No human on Earth does! :-)
+;;
+;; WARNING WARNING WARNING
(defun c-beginning-of-statement-1 (&optional lim)
;; move to the start of the current statement, or the previous
;; statement if already at the beginning of one.
(let ((firstp t)
(substmt-p t)
- donep c-in-literal-cache
- ;; KLUDGE ALERT: maybe-labelp is used to pass information
- ;; between c-crosses-statement-barrier-p and
- ;; c-beginning-of-statement-1. A better way should be
- ;; implemented.
- maybe-labelp saved
+ donep c-in-literal-cache saved
(last-begin (point)))
;; first check for bare semicolon
(if (and (progn (c-backward-syntactic-ws lim)
@@ -76,7 +82,7 @@
(setq last-begin (point)
donep t)))
- (setq maybe-labelp nil)
+ (setq c-maybe-labelp nil)
;; see if we're in a literal. if not, then this bufpos may be
;; a candidate for stopping
(cond
@@ -138,7 +144,7 @@
((c-crosses-statement-barrier-p (point) last-begin)
(setq donep t))
;; CASE 7: ignore labels
- ((and maybe-labelp
+ ((and c-maybe-labelp
(or (and c-access-key (looking-at c-access-key))
;; with switch labels, we have to go back further
;; to try to pick up the case or default
@@ -201,7 +207,7 @@
(if (memq (char-after) '(?\; ?{ ?}))
(setq crossedp t)
(if (eq (char-after) ?:)
- (setq maybe-labelp t))
+ (setq c-maybe-labelp t))
(forward-char 1))
(setq lim (point)))
(forward-char 1))))