Mercurial > emacs
diff lisp/progmodes/cc-styles.el @ 49660:425dcb97eca4
(c-set-offset): Don't find a default syntactic element through
syntactic analysis if called outside a CC Mode buffer.
author | Martin Stjernholm <mast@lysator.liu.se> |
---|---|
date | Mon, 10 Feb 2003 00:50:26 +0000 |
parents | 7f670dbc3aab |
children | bc91cbf50c24 d7ddb3e565de |
line wrap: on
line diff
--- a/lisp/progmodes/cc-styles.el Sun Feb 09 14:43:55 2003 +0000 +++ b/lisp/progmodes/cc-styles.el Mon Feb 10 00:50:26 2003 +0000 @@ -445,10 +445,11 @@ ;; 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)))