syntactic analysis if called outside a CC Mode buffer.
+2003-02-10 Martin Stjernholm <mast@lysator.liu.se>
+
+ * progmodes/cc-styles.el (c-set-offset): Don't find a default
+ syntactic element through syntactic analysis if called outside
+ a CC Mode buffer.
+
2003-02-09 Martin Stjernholm <mast@lysator.liu.se>
* progmodes/cc-mode.el (c-basic-common-init): Install
;; initial contents tries to be the last element
;; on the syntactic analysis list for the current
;; line
- (let* ((syntax (c-guess-basic-syntax))
- (len (length syntax))
- (ic (format "%s" (car (nth (1- len) syntax)))))
- (cons ic 0))
+ (and c-buffer-is-cc-mode
+ (let* ((syntax (c-guess-basic-syntax))
+ (len (length syntax))
+ (ic (format "%s" (car (nth (1- len) syntax)))))
+ (cons ic 0)))
)))
(offset (c-read-offset langelem)))
(list langelem offset current-prefix-arg)))