Commit c8b22035 authored by Alan Mackenzie's avatar Alan Mackenzie

CC Mode: revert recent changes and fix bug 17463 (cc-langs.elc gets

loaded at run-time).
* progmodes/cc-langs.el (c-no-parens-syntax-table): Rename the
c-lang-const to c-make-no-parens-syntax-table and correct the
logic.
(c-no-parens-syntax-table): Correct the logic of the c-lang-defvar.
parent d1bed1f7
2014-09-10 Alan Mackenzie <acm@muc.de>
CC Mode: revert recent changes and fix bug 17463 (cc-langs.elc
gets loaded at run-time).
* progmodes/cc-langs.el (c-no-parens-syntax-table): Rename the
c-lang-const to c-make-no-parens-syntax-table and correct the
logic.
(c-no-parens-syntax-table): Correct the logic of the
c-lang-defvar.
2014-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
CC-mode: Set open-paren-in-column-0-is-defun-start to nil;
......
This diff is collapsed.
This diff is collapsed.
......@@ -2222,8 +2222,6 @@ comment at the start of cc-engine.el for more info."
((and (not not-in-delimiter) ; inside a comment starter
(not (bobp))
(progn (backward-char)
;; FIXME: We never add category-properties to
;; c-emacs-features!
(and (not (and (memq 'category-properties c-emacs-features)
(looking-at "\\s!")))
(looking-at c-comment-start-regexp))))
......@@ -4121,10 +4119,10 @@ comment at the start of cc-engine.el for more info."
(c-end-of-current-token last-token-end-pos))
(setq last-token-end-pos (point))))))
;; Inside a token.
(goto-char (if lookbehind-submatch
;; See the NOTE above.
state-pos
(min last-token-end-pos bound))))
(if lookbehind-submatch
;; See the NOTE above.
(goto-char state-pos)
(goto-char (min last-token-end-pos bound))))
(t
;; A real match.
......
This diff is collapsed.
This diff is collapsed.
......@@ -95,9 +95,14 @@
(cc-require 'cc-menus)
(cc-require 'cc-guess)
;; Silence the compiler.
(cc-bytecomp-defvar adaptive-fill-first-line-regexp) ; Emacs
(cc-bytecomp-defun run-mode-hooks) ; Emacs 21.1
;; We set these variables during mode init, yet we don't require
;; font-lock.
(defvar font-lock-defaults)
(cc-bytecomp-defvar font-lock-defaults)
(cc-bytecomp-defvar font-lock-syntactic-keywords)
;; Menu support for both XEmacs and Emacs. If you don't have easymenu
;; with your version of Emacs, you are incompatible!
......@@ -547,8 +552,11 @@ that requires a literal mode spec at compile time."
;; heuristic that open parens in column 0 are defun starters. Since
;; we have c-state-cache, that heuristic isn't useful and only causes
;; trouble, so turn it off.
(when (memq 'col-0-paren c-emacs-features)
(set (make-local-variable 'open-paren-in-column-0-is-defun-start) nil))
;; 2006/12/17: This facility is somewhat confused, and doesn't really seem
;; helpful. Comment it out for now.
;; (when (memq 'col-0-paren c-emacs-features)
;; (make-local-variable 'open-paren-in-column-0-is-defun-start)
;; (setq open-paren-in-column-0-is-defun-start nil))
(c-clear-found-types)
......@@ -808,7 +816,7 @@ Note that the style variables are always made local to the buffer."
(defmacro c-run-mode-hooks (&rest hooks)
;; Emacs 21.1 has introduced a system with delayed mode hooks that
;; requires the use of the new function `run-mode-hooks'.
(if (fboundp 'run-mode-hooks)
(if (cc-bytecomp-fboundp 'run-mode-hooks)
`(run-mode-hooks ,@hooks)
`(progn ,@(mapcar (lambda (hook) `(run-hooks ,hook)) hooks))))
......@@ -1224,8 +1232,8 @@ This function is called from `c-common-init', once per mode initialization."
(font-lock-mark-block-function
. c-mark-function)))
(set (make-local-variable 'font-lock-fontify-region-function)
#'c-font-lock-fontify-region)
(make-local-variable 'font-lock-fontify-region-function)
(setq font-lock-fontify-region-function 'c-font-lock-fontify-region)
(if (featurep 'xemacs)
(make-local-hook 'font-lock-mode-hook))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment