comparison lisp/progmodes/cc-mode.el @ 90796:4ef881a120fe

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 675-697) - Update from CVS - Merge from gnus--rel--5.10 - Release ERC 5.2. * gnus--rel--5.10 (patch 211-215) - Update from CVS - Merge from emacs--devo--0 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-189
author Miles Bader <miles@gnu.org>
date Wed, 11 Apr 2007 00:17:47 +0000
parents 91bf6e05918b af512a29da94
children e6fdae9180d4
comparison
equal deleted inserted replaced
90795:b9182b6a90c9 90796:4ef881a120fe
156 156
157 ;; Make the `c-lang-setvar' variables buffer local in the current buffer. 157 ;; Make the `c-lang-setvar' variables buffer local in the current buffer.
158 ;; These are typically standard emacs variables such as `comment-start'. 158 ;; These are typically standard emacs variables such as `comment-start'.
159 (defmacro c-make-emacs-variables-local () 159 (defmacro c-make-emacs-variables-local ()
160 `(progn 160 `(progn
161 ,@(mapcan (lambda (init) 161 ,@(mapcar (lambda (init)
162 `((make-local-variable ',(car init)))) 162 `(make-local-variable ',(car init)))
163 (cdr c-emacs-variable-inits)))) 163 (cdr c-emacs-variable-inits))))
164 164
165 (defun c-init-language-vars-for (mode) 165 (defun c-init-language-vars-for (mode)
166 "Initialize the language variables for one of the language modes 166 "Initialize the language variables for one of the language modes
167 directly supported by CC Mode. This can be used instead of the 167 directly supported by CC Mode. This can be used instead of the
507 ;; First, find an appropriate boundary for this property search. 507 ;; First, find an appropriate boundary for this property search.
508 (let (lim 508 (let (lim
509 type type-pos 509 type type-pos
510 marked-id term-pos 510 marked-id term-pos
511 (end1 511 (end1
512 (if (eq (get-text-property end 'face) 'font-lock-comment-face) 512 (or (and (eq (get-text-property end 'face) 'font-lock-comment-face)
513 (previous-single-property-change end 'face) 513 (previous-single-property-change end 'face))
514 end))) 514 end)))
515 (when (>= end1 beg) ; Don't hassle about changes entirely in comments. 515 (when (>= end1 beg) ; Don't hassle about changes entirely in comments.
516 ;; Find a limit for the search for a `c-type' property 516 ;; Find a limit for the search for a `c-type' property
517 (while 517 (while
518 (and (/= (skip-chars-backward "^;{}") 0) 518 (and (/= (skip-chars-backward "^;{}") 0)
519 (> (point) (point-min)) 519 (> (point) (point-min))